diff --git a/install.sh b/install.sh index a8216890..f99dab1a 100755 --- a/install.sh +++ b/install.sh @@ -2,16 +2,16 @@ #Configures the environment for the *nix users. ac_version=1.1.0.5 -ac_dir=$(dirname $(readlink -f "${0}")) +ac_dir=$(dirname "$(readlink -f "${0}")") ac_exec=assaultcube.sh ac_menupath=~/.local/share/applications ac_desktoppath=~/Desktop ac_entryfile=assaultcube.desktop -ac_desktop="undefined" +ac_desktop=undefined GetDesktop() { - case ${DESKTOP_SESSION} in + case "${DESKTOP_SESSION}" in gnome) ac_desktop="Gnome" ;; @@ -22,7 +22,7 @@ GetDesktop() } existDesktopEntry() { - if [ -f ${ac_desktoppath}/${ac_entryfile} ]; then + if [ -f "${ac_desktoppath}/${ac_entryfile}" ]; then ac_existdesktopentry="X" else ac_existdesktopentry=" " @@ -30,7 +30,7 @@ existDesktopEntry() } existMenuEntry() { - if [ -f ${ac_menupath}/${ac_entryfile} ]; then + if [ -f "${ac_menupath}/${ac_entryfile}" ]; then ac_existmenuentry="X" else ac_existmenuentry=" " @@ -42,8 +42,8 @@ existProtocol() } installDesktopEntry() { - mkdir -pv ${ac_desktoppath} - cat > ${ac_desktoppath}/${ac_entryfile} < "${ac_desktoppath}/${ac_entryfile}" < ${ac_menupath}/${ac_entryfile} < "${ac_menupath}/${ac_entryfile}" <