summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libalpine.sh.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/libalpine.sh.in b/libalpine.sh.in
index 684f950..edfeeb0 100644
--- a/libalpine.sh.in
+++ b/libalpine.sh.in
@@ -71,6 +71,14 @@ cfg_add() {
[ -z "$NOCOMMIT" ] && lbu_add "$@"
}
+# return true if given value is 1, Y, Yes, yes YES etc
+yesno() {
+ case $1 in
+ [Yy]|[Yy][Ee][Ss]|1|[Tt][Rr][Uu][Ee]) return 0;;
+ esac
+ return 1
+}
+
# Detect if we are running Xen
is_xen() {
test -d /proc/xen