Commits

Cameron Simpson committed 783d92a

fix-backup-perms: only print commands if -x option supplied

Comments (0)

Files changed (1)

bin/fix-backup-perms

 
 recurse=
 users=${BACKUP_USERS:-backup}
-trace=set-x
+trace=
 
 cmd=$0
 usage="Usage: $cmd [-n] [-r] [-U user,...] pathnames...
   -n            No action; recite planned actions.
   -r            Recursive.
   -U user,...   Specify user[s] to have read access.
-                Default, from \$BACKUP_USERS: $users"
+                Default, from \$BACKUP_USERS: $users
+  -x            Trace execution."
 
 . /opt/css/env.sh
 
     -n) trace=echo ;;
     -r) recurse=1 ;;
     -U) users=$2; shift ;;
+    -x) trace=set-x ;;
     --) shift; break ;;
     -?*)echo "$cmd: unrecognised option: $1" >&2
         badopts=1