gctf2023/pwn/flipper/dist/utils/prompt.sh
2023-11-24 13:11:34 -05:00

18 lines
301 B
Bash
Executable File

#!/usr/bin/env bash
# prompt users when removing whole directories
# used when making target "mrproper"
read -p "$1" answer_from_user
# early exit for lazy users
if [[ -z $answer_from_user ]]; then
exit 0
fi
# proper case handling
case $answer_from_user in
[Yy]* ) exit 0;;
* ) exit -1;;
esac