add an option to delete the script after use

prevents clogging of the hard drive
This commit is contained in:
GermanBread 2020-11-08 13:28:02 +01:00 committed by GitHub
parent cdfe7449a2
commit 3ea9d9e777
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 1 deletions

View File

@ -174,4 +174,19 @@ case $selection in
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 12)Exiting script$(tput sgr0)\n";
;;
esac
#ask the user if the script should not delete itself
printf "Do you want to keep the install script? [y/N] ";
read a;
case $a in
y)
exit;
;;
Y)
exit;
;;
esac
#if the user didn't say yes
rm -f Lightcord_installer.sh;