Skip to content

Commit

Permalink
Merge pull request atom#2144 from aureliojargas/patch-2
Browse files Browse the repository at this point in the history
Use $(...) for command substitution, not backticks
  • Loading branch information
Corey Johnson committed May 10, 2014
2 parents 5b0d974 + 2b73dff commit c81a673
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions atom.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/bash

if [ "`uname`" == 'Darwin' ]; then
if [ "$(uname)" == 'Darwin' ]; then
OS='Mac'
elif [ "`expr substr $(uname -s) 1 5`" == 'Linux' ]; then
elif [ "$(expr substr $(uname -s) 1 5)" == 'Linux' ]; then
OS='Linux'
elif [ "`expr substr $(uname -s) 1 10`" == 'MINGW32_NT' ]; then
elif [ "$(expr substr $(uname -s) 1 10)" == 'MINGW32_NT' ]; then
OS='Cygwin'
else
echo "Your platform (`uname -a`) is not supported."
echo "Your platform ($(uname -a)) is not supported."
exit 1
fi

Expand Down Expand Up @@ -66,8 +66,8 @@ if [ $OS == 'Mac' ]; then
open -a "$ATOM_PATH/$ATOM_APP_NAME" -n --args --executed-from="$(pwd)" --pid=$$ "$@"
fi
elif [ $OS == 'Linux' ]; then
SCRIPT=`readlink -f "$0"`
USR_DIRECTORY=`readlink -f $(dirname $SCRIPT)/..`
SCRIPT=$(readlink -f "$0")
USR_DIRECTORY=$(readlink -f $(dirname $SCRIPT)/..)
ATOM_PATH="$USR_DIRECTORY/share/atom/atom"

[ -x "$ATOM_PATH" ] || ATOM_PATH='/tmp/atom-build/Atom/atom'
Expand Down

0 comments on commit c81a673

Please sign in to comment.