12 lines
212 B
Bash
12 lines
212 B
Bash
#!/bin/bash
|
|
prompt() {
|
|
read -p "$1 (y/n)? " choice
|
|
case "$choice" in
|
|
y | Y) echo "yes" ;;
|
|
n | N) echo "no" ;;
|
|
*) echo "invalid" ;;
|
|
esac
|
|
}
|
|
|
|
[[ "${1}" != "--source-only" ]] && prompt "${@}"
|