Skip to content

Commit

Permalink
🐛 Fix parsing of DESKTOP_SESSION to check for cinnamon
Browse files Browse the repository at this point in the history
See Issue atom#23733
  • Loading branch information
ptous committed Apr 11, 2022
1 parent 2e9dc8a commit b66917e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions atom.sh
Expand Up @@ -2,7 +2,7 @@

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'
else
echo "Your platform ($(uname -a)) is not supported."
Expand Down Expand Up @@ -151,7 +151,7 @@ if [ $OS == 'Mac' ]; then
fi
elif [ $OS == 'Linux' ]; then
SCRIPT=$(readlink -f "$0")
USR_DIRECTORY=$(readlink -f $(dirname $SCRIPT)/..)
USR_DIRECTORY=$(readlink -f "$(dirname $SCRIPT)"/..)

case $CHANNEL in
beta)
Expand All @@ -169,7 +169,7 @@ elif [ $OS == 'Linux' ]; then
esac

#Will allow user to get context menu on cinnamon desktop enviroment
if [[ "$(expr substr $(printenv | grep "DESKTOP_SESSION=") 17 8)" == "cinnamon" ]]; then
if [[ "$(expr substr "$(printenv | grep "DESKTOP_SESSION=")" 17 8)" == "cinnamon" ]]; then
cp "resources/linux/desktopenviroment/cinnamon/atom.nemo_action" "/usr/share/nemo/actions/atom.nemo_action"
fi

Expand Down

0 comments on commit b66917e

Please sign in to comment.