mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
validate user input in launch_bootable_Script
This commit is contained in:
parent
78f9cf5fe4
commit
da53553675
@ -24,7 +24,7 @@ errorLog () {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
Verify we can find the script
|
#Verify we can find the script
|
||||||
if [[ -x "$AUTOPSY_BIN" ]]; then
|
if [[ -x "$AUTOPSY_BIN" ]]; then
|
||||||
infoLog "Autopsy found"
|
infoLog "Autopsy found"
|
||||||
else
|
else
|
||||||
@ -66,7 +66,11 @@ showAndReadOptions () {
|
|||||||
echo [$x] "${word}"
|
echo [$x] "${word}"
|
||||||
x=$((x + 1))
|
x=$((x + 1))
|
||||||
done
|
done
|
||||||
read option
|
read -n 1 option
|
||||||
|
if [[ $option = "" ]] || ! [[ "$option" =~ ^[0-9]+$ ]]; then
|
||||||
|
echo "Please choose a valid option"
|
||||||
|
showAndReadOptions
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user