switchhere | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit cd93aba6ec7c582492d8aebdeac4d61df8f64e2b
Author: Jeroen van Meeuwen (Fedora Unity) <kanarip(a)fedoraunity.org>
Date: Tue Feb 10 22:50:14 2009 +0100
Have ./switchhere take --yes
diff --git a/switchhere b/switchhere
index 1de8675..26455a9 100755
--- a/switchhere
+++ b/switchhere
@@ -1,7 +1,12 @@
#!/bin/bash
-read -a answer -n 1 -p "This script is going to remove some, and then add some
symlinks and/or files. Continue? [y/N] " INPUT
-echo ""
+if [ "$1" != "--yes" ]; then
+ read -a answer -n 1 -p "This script is going to remove some, and then add some
symlinks and/or files. Continue? [y/N] " INPUT
+ echo ""
+else
+ answer=y
+fi
+
if [ -z "$answer" -o "${answer[0]}" == "N" -o
"${answer[0]}" == "n" ]; then
echo "Quitting."
exit 0
Show replies by date