diff --git a/install.sh b/install.sh index 349589e..aab3c95 100755 --- a/install.sh +++ b/install.sh @@ -1,48 +1,20 @@ #!/bin/bash -main(){ +main() +{ clear read -p "Please Press 1 to Install or 2 to Uninstall --> : " INPUT - if [ "$INPUT" == 1 ]; then - sudo cp shellMen /bin/ + if [[ "$INPUT" == 1 ]]; then + sudo cp ./shellMen /bin/ sudo chown root:root /bin/shellMen sudo chmod +x /bin/shellMen - elif [ "$INPUT" == 2 ]; then + elif [[ "$INPUT" == 2 ]]; then sudo rm /bin/shellMen - elif [ "$INPUT" !== 1 ] || [ "$INPUT" !== 2 ] ; then + elif [[ "$INPUT" != 1 || "$INPUT" != 2 ]] ; then echo "Please type 1 or 2." + sleep 2 main fi } main -2>"${INPUT}" -menuitem=$(<"${INPUT}") -case $menuitem in -Main_Menu) bash /bin/shellMen ;; -esac -2>"${INPUT}" -menuitem=$(<"${INPUT}") -case $menuitem in -Main_Menu) bash /bin/shellMen ;; -esac -2>"${INPUT}" -menuitem=$(<"${INPUT}") -case $menuitem in -Main_Menu) bash /bin/shellMen ;; -esac -2>"${INPUT}" -menuitem=$(<"${INPUT}") -case $menuitem in -Main_Menu) bash /bin/shellMen ;; -esac -2>"${INPUT}" -menuitem=$(<"${INPUT}") -case $menuitem in -Main_Menu) bash /bin/shellMen ;; -esac -2>"${INPUT}" -menuitem=$(<"${INPUT}") -case $menuitem in -Main_Menu) bash /bin/shellMen ;; -esac diff --git a/shellMen b/shellMen index 8cd3ab9..761f04c 100755 --- a/shellMen +++ b/shellMen @@ -32,38 +32,6 @@ settngs="Settings" wine="Wine" pth="/tmp/sysMENU" fi } -mainMENU() -{ -INPUT=/tmp/menu.txt - dialog --clear --backtitle "Shellmen" \ - --title "[ M A I N - M E N U ]" \ - --menu "Please Select An Option" 16 50 15 \ - Accessories "General Programs" \ - System "Main System Programs" \ - Settings "Main System Settings" \ - Multimedia "Audio & Video Programs" \ - Graphics "Image Programs" \ - Games "Gaming Programs" \ - Office "Wordprocess & Documents Programs" \ - Development "Programing Programs" \ - Internet "Various Internet Related Programs" \ - Wine "Windows Exe & Program Support" 2>"${INPUT}" - menuitem=$(<"${INPUT}") - case $menuitem in - Accessories) bash "${pth}"/Accessories.sh ;; - System) bash "${pth}"/System.sh ;; - Settings) bash "${pth}"/Settings.sh ;; - Multimedia) bash "${pth}"/Multimedia.sh ;; - Graphics) bash "${pth}"/Graphics.sh ;; - Games) bash "${pth}"/Game.sh ;; - Office) bash "${pth}"/Office.sh ;; - Development) bash "${pth}"/Development.sh ;; - Internet) bash "${pth}"/Internet.sh ;; - Wine) bash "${pth}"/Wine.sh ;; - Exit) echo "Bye!"; break ;; - esac -} - startScan() { clear @@ -150,7 +118,7 @@ i="1" execMethod=$(grep -A 0 "Exec=" /usr/share/applications/"$line1") catagory=$(grep -A 0 "Categories=" /usr/share/applications/"$line1") preComment=$(grep -A 0 "Comment=" /usr/share/applications/"$line1") - execCMD=$(echo "${filename}) exec ${filename} ;;") + execCMD=$(echo "${filename}) ""${filename} %f 2&>1 /dev/null"" & shellMen ;;") if [[ "$catagory" == *"$accss"* ]] || [[ "$catagory" == *"$util"* ]]; then echo "$execCMD" >> "${pth}"/${accss}.sh elif [[ "$catagory" == *"$dev"* ]]; then @@ -180,4 +148,36 @@ done chmod +x "${pth}"/*.sh mainMENU; } + +mainMENU() +{ +INPUT=/tmp/menu.txt + dialog --clear --backtitle "Shellmen" \ + --title "[ M A I N - M E N U ]" \ + --menu "Please Select An Option" 16 50 15 \ + Accessories "General Programs" \ + System "Main System Programs" \ + Settings "Main System Settings" \ + Multimedia "Audio & Video Programs" \ + Graphics "Image Programs" \ + Games "Gaming Programs" \ + Office "Wordprocess & Documents Programs" \ + Development "Programing Programs" \ + Internet "Various Internet Related Programs" \ + Wine "Windows Exe & Program Support" 2>"${INPUT}" + menuitem=$(<"${INPUT}") + case $menuitem in + Accessories) bash "${pth}"/Accessories.sh ;; + System) bash "${pth}"/System.sh ;; + Settings) bash "${pth}"/Settings.sh ;; + Multimedia) bash "${pth}"/Multimedia.sh ;; + Graphics) bash "${pth}"/Graphics.sh ;; + Games) bash "${pth}"/Game.sh ;; + Office) bash "${pth}"/Office.sh ;; + Development) bash "${pth}"/Development.sh ;; + Internet) bash "${pth}"/Internet.sh ;; + Wine) bash "${pth}"/Wine.sh ;; + Exit) echo "Bye!"; break ;; + esac +} pre;