summaryrefslogtreecommitdiff
path: root/bin/backup-clean
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2020-09-18 15:21:29 +0200
committerMarc Vertes <mvertes@free.fr>2020-09-18 15:21:29 +0200
commitfdca1b712c9d62213de1002a02b040fa66bfc0f1 (patch)
treeb0d52ff09035faf2dd0831cf1a06433fb85cbe07 /bin/backup-clean
parentea18410af09ef8ef4f044079a72c82b2d41151a4 (diff)
update
Diffstat (limited to 'bin/backup-clean')
-rwxr-xr-xbin/backup-clean6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/backup-clean b/bin/backup-clean
index d12159d..0c6e38a 100755
--- a/bin/backup-clean
+++ b/bin/backup-clean
@@ -54,15 +54,15 @@ retention_delay() {
}
dest=/.history
-while getopts :nd:v opt; do
+while getopts :nv opt; do
case $opt in
- (d) dest=$OPTARG ;;
(n) optn=1 ;;
(v) optv=1 ;;
- (*) echo "Usage: $0 [-nv] [-d dir]"; exit 1;
+ (*) echo "Usage: $0 [-nv] [dir]"; exit 1;
esac
done
shift $((OPTIND - 1))
+[ "$1" ] && dest=$1
# Sorted list of backups, most recent first.
lbu=$(ls -rv "$dest")