mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-09 14:49:32 +00:00
Merge pull request #4025 from rishwanth1995/develop
validate user input in launch_bootable_Script
This commit is contained in:
commit
7f1d1b995b
@ -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