gctf2023/pwn/flipper/dist/utils/prompt.sh

18 lines
301 B
Bash
Raw Permalink Normal View History

2023-11-24 18:11:34 +00:00
#!/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