summaryrefslogtreecommitdiff
path: root/scripts/yesno
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-09-01 21:10:39 +0200
committerGitHub <noreply@github.com>2019-09-01 21:10:39 +0200
commit6c460809b650377d2803b433c75914d7b707592e (patch)
tree4b245e21369c40de3bf2119095abcf52bd38a6f3 /scripts/yesno
parent9ae04f290d6437001bd0cc1daa58e5c304b76e4c (diff)
parenteea95c8980a290d753777da173935f39f1589b9b (diff)
downloadvyatta-op-6c460809b650377d2803b433c75914d7b707592e.tar.gz
vyatta-op-6c460809b650377d2803b433c75914d7b707592e.zip
Merge pull request #27 from alkersan/T1621_misc_rewrites
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
-
-
-