diff --git a/trm.rst b/trm.rst index 96651e2..daf8483 100644 --- a/trm.rst +++ b/trm.rst @@ -7,7 +7,7 @@ SYNOPSIS -------- -``trm.sh -cehinstvx -g graveyard [file|dir] ...`` +``trm.sh -Vcdhistvx -g graveyard [file|dir] ...`` DESCRIPTION @@ -56,15 +56,15 @@ line options: + -V display version control commit ID -c copy targets to graveyard, don't remove them - -e empty the current graveyard (permanent removal) + -d empty the current graveyard (permanent removal) -h display this help screen -g graveyard use named graveyard instead of default -i interactive removal/copy - -n noisy output - verbose mode -s don't generate serial number suffixes -t test mode, just show what would be done - -v display version control commit ID + -v noisy output - verbose mode -x execute, overrides previous -t @@ -98,7 +98,7 @@ - If you are using multiple graveyards, you can use this property to your advantage to clear them all with one command:: - trm -v -g gy1 -e -g gy2 -e -g gy3 -e .... + trm -v -g gy1 -d -g gy2 -d -g gy3 -d .... - Serial numbers are appened to the target *as named on the command line*. If you delete a file, then it wil go into the graveyard as diff --git a/trm.sh b/trm.sh index a937bd2..a746d87 100755 --- a/trm.sh +++ b/trm.sh @@ -23,17 +23,17 @@ echo "trm.sh ${VERSION} - Copyright (c) ${COPYRIGHT} , TundraWare Inc. All Rights Reserved." echo "http://www.tundraware.com/Software/trm" echo "" - echo "Usage: trm.sh -cehinstvx -g graveyard [file|dir] ..." + echo "Usage: trm.sh -Vcdhistvx -g graveyard [file|dir] ..." echo " where," + echo " -V display version control commit ID" echo " -c copy targets to graveyard, don't remove them" - echo " -e empty the current graveyard (permanent removal)" + echo " -d empty the current graveyard (permanent removal)" echo " -h display this help screen" echo " -g graveyard use named graveyard instead of default" echo " -i interactive removal/copy" - echo " -n noisy output - verbose mode" echo " -s don't generate serial number suffixes" echo " -t test mode, just show what would be done" - echo " -v display version control commit ID" + echo " -v noisy output - verbose mode" echo " -x execute, overrides previous -t" } @@ -56,14 +56,14 @@ # Parse command line args - OPTLIST='ceg:hinstvx' # List of all legal command line options - OPTIND=1 # in case getopts was previously used in this context + OPTLIST='Vcdg:histvx' # List of all legal command line options + OPTIND=1 # in case getopts was previously used in this context # Defaults INTERACTIVE="" - OPERATOR="mv" # Can be overriden with -c option - SERIALNO="Yes" # Generate serial numbers + OPERATOR="mv" # Can be overriden with -c option + SERIALNO="Yes" # Generate serial numbers TESTMODE="" VERBOSE="" @@ -72,13 +72,18 @@ case $opt in + # Print git commit ID + V) + echo ${GITID} + ;; + # Copy, don't move, targets to graveyard c) OPERATOR="cp -pr" ;; # Empty the graveyard - e) + d) if [ -z "${TESTMODE}" ] then rm -rf ${VERBOSE} ${GRAVEYARD}/* ${GRAVEYARD}/.[-z]* @@ -99,11 +104,6 @@ INTERACTIVE="Yes" ;; - # Be noisy - n) - VERBOSE="-v" - ;; - # Turn of serial number generation s) SERIALNO="" @@ -114,9 +114,9 @@ TESTMODE=${TESTING} ;; - # Print git commit ID + # Be noisy v) - echo ${GITID} + VERBOSE="-v" ;; # Actually execute