From 9c9cb120813557eb626bb373ea4bd23fac9425f4 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Thu, 19 Jul 2018 10:53:43 -0700 Subject: [PATCH] Use correct executable name for Atom Dev.app in atom.sh --- atom.sh | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/atom.sh b/atom.sh index a1c96abeb..935204bfc 100755 --- a/atom.sh +++ b/atom.sh @@ -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