make installation work on non-lxterminal

pull/61/head
Botspot 5 years ago
parent f5755a44ae
commit 65a593a756

39
gui

@ -26,31 +26,29 @@ if [ ! -z "$1" ];then
fi fi
install() { install() {
x-terminal-emulator --title="Installing $output" -e " x-terminal-emulator --title="Installing $app" -e '
cd $HOME if "'"${DIRECTORY}/manage"'" install "'"$app"'" ; then
if \"${DIRECTORY}/manage\" install \"$output\" ; then echo -e "\nClosing in 30 seconds."
echo 'Closing in 10 seconds...' sleep 30
sleep 10
else else
echo '\n\e[41m\e[30mCommand failed!\e[39m\e[49m\nClose this window to exit.' echo -e "\nClose this window to exit."
read enter #technically you could press Enter to exit. read enter #technically you could press Enter to exit.
fi" fi'
sleep 1 sleep 1
while ps -C manage >/dev/null;do sleep 0.1; done while ps -C manage &>/dev/null;do sleep 0.1; done
} }
uninstall() { uninstall() {
x-terminal-emulator --title="Uninstalling $output" -e " x-terminal-emulator --title="Uninstalling $app" -e '
cd $HOME if "'"${DIRECTORY}/manage"'" uninstall "'"$app"'" ; then
if \"${DIRECTORY}/manage\" uninstall \"$output\" ; then echo -e "\nClosing in 30 seconds."
echo 'Closing in 10 seconds...' sleep 30
sleep 10
else else
echo '\n\e[41m\e[30mCommand failed!\e[39m\e[49m\nClose this window to exit.' echo -e "\nClose this window to exit."
read enter #technically you could press Enter to exit. read enter #technically you could press Enter to exit.
fi" fi'
sleep 1 sleep 1
while ps -C manage >/dev/null;do sleep 0.1; done while ps -C manage &>/dev/null;do sleep 0.1; done
} }
while true;do while true;do
@ -146,10 +144,10 @@ $installedpackages"
#clear app var #clear app var
output='' output=''
elif [ $button == 4 ];then elif [ $button == 4 ];then
#install app="$output"
install install
elif [ $button == 2 ];then elif [ $button == 2 ];then
#uninstall app="$output"
uninstall uninstall
elif [ $button == 6 ];then elif [ $button == 6 ];then
echo 'previous app' echo 'previous app'
@ -201,16 +199,15 @@ $installedpackages"
echo 'unknown button. Exiting now.' echo 'unknown button. Exiting now.'
exit 0 exit 0
fi fi
;; ;;
2) 2)
echo "Uninstall" app="$output"
uninstall uninstall
#clear output var to prompt main window to open next #clear output var to prompt main window to open next
output='' output=''
;; ;;
4) 4)
echo "Install" app="$output"
install install
#clear output var to prompt main window to open next #clear output var to prompt main window to open next
output='' output=''

Loading…
Cancel
Save