Skip to content

Commit

Permalink
Atom.sh - identify and create atom home dir regardless of platform
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbrunsfeld committed Jun 5, 2018
1 parent ba96165 commit 81088b6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions atom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ if [ $REDIRECT_STDERR ]; then
exec 2> /dev/null
fi

ATOM_HOME="${ATOM_HOME:-$HOME/.atom}"
mkdir -p "$ATOM_HOME"

if [ $OS == 'Mac' ]; then
if [ -L "$0" ]; then
SCRIPT="$(readlink "$0")"
Expand Down Expand Up @@ -119,9 +122,6 @@ elif [ $OS == 'Linux' ]; then
;;
esac

ATOM_HOME="${ATOM_HOME:-$HOME/.atom}"
mkdir -p "$ATOM_HOME"

: ${TMPDIR:=/tmp}

[ -x "$ATOM_PATH" ] || ATOM_PATH="$TMPDIR/atom-build/Atom/atom"
Expand Down Expand Up @@ -155,7 +155,7 @@ if [ $WAIT ]; then
read < "$WAIT_FIFO" || break
sleep 1 # prevent a tight loop
done

# fall back to sleep
while true; do
sleep 1
Expand Down

0 comments on commit 81088b6

Please sign in to comment.