terminal stay open if failed

pull/129/head
Botspot 5 years ago
parent e42bd4cea7
commit edbbf0cf2f

2
gui

@ -45,7 +45,7 @@ install() {
echo -e "\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
' "$title" ' "$title"
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
} }

@ -39,17 +39,28 @@ if [ "$1" == 'multi-install' ];then
for app in $2 for app in $2
do do
"${DIRECTORY}/manage" install "$app" "${DIRECTORY}/manage" install "$app"
if [ $? != 0 ];then
failed=1
fi
done done
IFS="$PREIFS" IFS="$PREIFS"
if [ $failed == 1 ] && [ "$(echo "$1" | wc -l)" == 1 ];then
exit 1
fi
elif [ "$1" == 'multi-uninstall' ];then elif [ "$1" == 'multi-uninstall' ];then
PREIFS="$IFS" PREIFS="$IFS"
IFS=$'\n' IFS=$'\n'
for app in $2 for app in $2
do do
"${DIRECTORY}/manage" uninstall "$app" "${DIRECTORY}/manage" uninstall "$app"
if [ $? != 0 ];then
failed=1
fi
done done
IFS="$PREIFS" IFS="$PREIFS"
if [ $failed == 1 ] && [ "$(echo "$1" | wc -l)" == 1 ];then
exit 1
fi
elif [ "$1" == 'install' ];then elif [ "$1" == 'install' ];then
#INSTALL #INSTALL
#for this operation, a program name must be specified. #for this operation, a program name must be specified.

Loading…
Cancel
Save