[Dplr-commits] r798 - pkg/dplR

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Apr 9 16:51:35 CEST 2014


Author: mvkorpel
Date: 2014-04-09 16:51:35 +0200 (Wed, 09 Apr 2014)
New Revision: 798

Modified:
   pkg/dplR/svnclean.sh
Log:
Changed default behavior: prompt before every removal


Modified: pkg/dplR/svnclean.sh
===================================================================
--- pkg/dplR/svnclean.sh	2014-04-09 14:37:12 UTC (rev 797)
+++ pkg/dplR/svnclean.sh	2014-04-09 14:51:35 UTC (rev 798)
@@ -1,23 +1,23 @@
 #!/usr/bin/env bash
 
 # http://stackoverflow.com/questions/5474732/how-can-i-add-a-help-method-to-a-shell-script
-usage="$(basename "$0") [-h] [-l] [-p]
+usage="$(basename "$0") [-h] [-f] [-l]
 
 Remove files that are not controlled by svn,
 
 where:
     -h  show this help text
-    -p  prompt before every removal (default: force, i.e. never ask)
+    -f  don't ask questions (default: prompt before every removal)
     -l  only list the files to be removed"
 
 listfiles=0
-rmprompt=0
+rmprompt=1
 # http://stackoverflow.com/questions/4882349/parsing-shell-script-arguments
 while [[ $1 == -* ]]; do
     case "$1" in
 	-h) echo "$usage"; exit;;
 	-l) listfiles=1; shift;;
-	-p) rmprompt=1; shift;;
+	-f) rmprompt=0; shift;;
 	-*) echo "invalid option: $1" 1>&2; exit 1;;
     esac
 done



More information about the Dplr-commits mailing list