Skip to content

Commit

Permalink
atom.sh: fix direct execute
Browse files Browse the repository at this point in the history
  • Loading branch information
skull-squadron committed Oct 24, 2016
1 parent b957b46 commit 25650e8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion atom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ if [ $EXPECT_OUTPUT ]; then
fi

if [ $OS == 'Mac' ]; then
ATOM_APP="$(dirname "$(dirname "$(dirname "$(dirname "$(readlink "$0")")")")")"
if [ -L "$0" ]; then
SCRIPT="$(readlink "$0")"
else
SCRIPT="$0"
fi
ATOM_APP="$(dirname "$(dirname "$(dirname "$(dirname "$SCRIPT")")")")"
if [ "$ATOM_APP" == . ]; then
unset ATOM_APP
else
Expand Down

0 comments on commit 25650e8

Please sign in to comment.