From 3ea9d9e777a88ca5d8c7e33c6557e4ca1eac45fe Mon Sep 17 00:00:00 2001 From: GermanBread <71450236+GermanBread@users.noreply.github.com> Date: Sun, 8 Nov 2020 13:28:02 +0100 Subject: [PATCH] add an option to delete the script after use prevents clogging of the hard drive --- Lightcord_installer.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Lightcord_installer.sh b/Lightcord_installer.sh index 98ac183..c3dee72 100644 --- a/Lightcord_installer.sh +++ b/Lightcord_installer.sh @@ -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 - \ No newline at end of file + +#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;