Add cancel button handling
This commit is contained in:
parent
eec69f5741
commit
d377834f8e
|
@ -24,7 +24,7 @@ startRice() {
|
||||||
|
|
||||||
./scripts/linkFiles.sh
|
./scripts/linkFiles.sh
|
||||||
|
|
||||||
# clear
|
clear
|
||||||
}
|
}
|
||||||
|
|
||||||
startRice
|
startRice
|
|
@ -15,6 +15,9 @@ linkFile() {
|
||||||
ln -s "$1" "$2"
|
ln -s "$1" "$2"
|
||||||
else
|
else
|
||||||
selectedOption=$(dialog --menu "File already exists: $(basename "$1"), what would you like to do?" 10 60 0 1 "Skip" 2 "Skip all" 3 "Overwrite" 4 "Overwrite all" 5 "Backup" 6 "Backup all" 3>&1 1>&2 2>&3 3>&1)
|
selectedOption=$(dialog --menu "File already exists: $(basename "$1"), what would you like to do?" 10 60 0 1 "Skip" 2 "Skip all" 3 "Overwrite" 4 "Overwrite all" 5 "Backup" 6 "Backup all" 3>&1 1>&2 2>&3 3>&1)
|
||||||
|
if [ "$selectedOption" = "" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $selectedOption -eq 1 ]; then
|
if [ $selectedOption -eq 1 ]; then
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue