Skip to content

Commit

Permalink
Use correct executable name for Atom Dev.app in atom.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
daviwil committed Jul 19, 2018
1 parent 84b2ba7 commit 9c9cb12
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions atom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,20 @@ if [ $OS == 'Mac' ]; then
ATOM_APP_NAME="$(basename "$ATOM_APP")"
fi

if [ "$CHANNEL" == 'beta' ]; then
ATOM_EXECUTABLE_NAME="Atom Beta"
elif [ "$CHANNEL" == 'nightly' ]; then
ATOM_EXECUTABLE_NAME="Atom Nightly"
elif [ "$CHANNEL" == 'dev' ]; then
ATOM_EXECUTABLE_NAME="Atom Dev"
if [ ! -z "${ATOM_APP_NAME}" ]; then
# If ATOM_APP_NAME is known, use it as the executable name
ATOM_EXECUTABLE_NAME="${ATOM_APP_NAME%.*}"
else
ATOM_EXECUTABLE_NAME="Atom"
# Else choose it from the inferred channel name
if [ "$CHANNEL" == 'beta' ]; then
ATOM_EXECUTABLE_NAME="Atom Beta"
elif [ "$CHANNEL" == 'nightly' ]; then
ATOM_EXECUTABLE_NAME="Atom Nightly"
elif [ "$CHANNEL" == 'dev' ]; then
ATOM_EXECUTABLE_NAME="Atom Dev"
else
ATOM_EXECUTABLE_NAME="Atom"
fi
fi

if [ -z "${ATOM_PATH}" ]; then
Expand Down

0 comments on commit 9c9cb12

Please sign in to comment.