summaryrefslogtreecommitdiff
path: root/scripts/yesno
diff options
context:
space:
mode:
authorDmytro Aleksandrov <alkersan@gmail.com>2019-08-30 18:43:01 +0300
committerDmytro Aleksandrov <alkersan@gmail.com>2019-08-30 18:43:01 +0300
commiteea95c8980a290d753777da173935f39f1589b9b (patch)
treee2d8f866b38be9dbe35973bb632df8e7a90d256c /scripts/yesno
parent8efa92beebfbeb70dd834b568365eda161271d38 (diff)
downloadvyatta-op-eea95c8980a290d753777da173935f39f1589b9b.tar.gz
vyatta-op-eea95c8980a290d753777da173935f39f1589b9b.zip
T1621 remove misc ops after python/xml rewrite
Diffstat (limited to 'scripts/yesno')
-rwxr-xr-xscripts/yesno31
1 files changed, 0 insertions, 31 deletions
diff --git a/scripts/yesno b/scripts/yesno
deleted file mode 100755
index 260a23c..0000000
--- a/scripts/yesno
+++ /dev/null
@@ -1,31 +0,0 @@
-#! /bin/bash
-# Usage: yesno prompt...
-
-default=
-if [ "$1" = "-y" ]
-then default='y'; shift
-elif [[ "$1" = "-n" ]]; then
- default='n'; shift
-fi
-
-
-if [ $# -eq 0 ]
-then prompt="yes or no: "
-else prompt="$*"
-fi
-
-while true
-do
- read -p "$prompt" || exit 1
- if [ -z "$REPLY" -a ! -z "$default" ]
- then REPLY=$default
- fi
- case "$REPLY" in
- y*|Y*) exit 0;;
- n*|n*) exit 1;;
- *) echo "Answer yes or no please";;
- esac
-done
-
-
-