mirror of
https://codeberg.org/knightsub9/lxcafe.git
synced 2026-07-19 19:30:16 +02:00
17 lines
413 B
Bash
Executable File
17 lines
413 B
Bash
Executable File
# functions and variables for use in multiple files ("common" functions and variables)
|
|
|
|
question_answered_with_yes() {
|
|
local prompt="$1"
|
|
local ans
|
|
printf '%b\n Geben Sie j oder n ein und die Eingabetaste,\n Abbruch mit jeder anderen Taste ... [j/N]: ' "$prompt"
|
|
read -r ans
|
|
case "$ans" in
|
|
j | J | ja | y | Y) return 0 ;;
|
|
n | N | "") return 1 ;;
|
|
*)
|
|
echo "Abbruch."
|
|
exit 1
|
|
;;
|
|
esac
|
|
}
|