Skip to content

Commit

Permalink
Add dev channel atom.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
MoritzKn committed Aug 30, 2017
1 parent 6d2a906 commit 0786159
Showing 1 changed file with 23 additions and 11 deletions.
34 changes: 23 additions & 11 deletions atom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,17 @@ else
exit 1
fi

if [ "$(basename $0)" == 'atom-beta' ]; then
BETA_VERSION=true
else
BETA_VERSION=
fi
case $(basename $0) in
atom-beta)
CHANNEL=beta
;;
atom-dev)
CHANNEL=dev
;;
*)
CHANNEL=stable
;;
esac

export ATOM_DISABLE_SHELLING_OUT_FOR_ENVIRONMENT=true

Expand Down Expand Up @@ -67,7 +73,7 @@ if [ $OS == 'Mac' ]; then
ATOM_APP_NAME="$(basename "$ATOM_APP")"
fi

if [ -n "$BETA_VERSION" ]; then
if [ "$CHANNEL" == 'beta' ]; then
ATOM_EXECUTABLE_NAME="Atom Beta"
else
ATOM_EXECUTABLE_NAME="Atom"
Expand Down Expand Up @@ -101,11 +107,17 @@ elif [ $OS == 'Linux' ]; then
SCRIPT=$(readlink -f "$0")
USR_DIRECTORY=$(readlink -f $(dirname $SCRIPT)/..)

if [ -n "$BETA_VERSION" ]; then
ATOM_PATH="$USR_DIRECTORY/share/atom-beta/atom"
else
ATOM_PATH="$USR_DIRECTORY/share/atom/atom"
fi
case $CHANNEL in
beta)
ATOM_PATH="$USR_DIRECTORY/share/atom-beta/atom"
;;
dev)
ATOM_PATH="$USR_DIRECTORY/share/atom-dev/atom"
;;
*)
ATOM_PATH="$USR_DIRECTORY/share/atom/atom"
;;
esac

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

0 comments on commit 0786159

Please sign in to comment.