summaryrefslogtreecommitdiff
path: root/uninit.d
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-05-06 14:05:17 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-05-06 14:05:17 -0400
commitc732475d89ae616de5ddd2b05190ae15ebce30ba (patch)
treea2c841d7fa7e0ff3b87f12ce0d88015002be59c7 /uninit.d
parent55dcc6bf963f922e1ed5c4bbaaefcfacef57b1d7 (diff)
Make etckeeper uninit -f disable the prompt.
Diffstat (limited to 'uninit.d')
-rwxr-xr-xuninit.d/01prompt32
1 files changed, 17 insertions, 15 deletions
diff --git a/uninit.d/01prompt b/uninit.d/01prompt
index 23e9637..07f2e41 100755
--- a/uninit.d/01prompt
+++ b/uninit.d/01prompt
@@ -1,18 +1,20 @@
#!/bin/sh
set -e
-echo "** Warning: This will DESTROY all recorded history for $ETCKEEPER_DIR,"
-echo "** including the $VCS repository and ignore file."
-echo ""
-printf "Are you sure you want to do this? [yN] "
-read answer
-case "$answer" in
- [Yy]*)
- echo "Proceeding.."
- exit 0
- ;;
- *)
- echo "Aborting etckeeper uninit."
- exit 1
- ;;
-esac
+if [ "$1" != "-f" ]; then
+ echo "** Warning: This will DESTROY all recorded history for $ETCKEEPER_DIR,"
+ echo "** including the $VCS repository and ignore file."
+ echo ""
+ printf "Are you sure you want to do this? [yN] "
+ read answer
+ case "$answer" in
+ [Yy]*)
+ echo "Proceeding.."
+ exit 0
+ ;;
+ *)
+ echo "Aborting etckeeper uninit."
+ exit 1
+ ;;
+ esac
+fi