commit 2b2f702327a35b07b7f60807153f709f30ab6dcc parent 0a238814f1fcd78d197366b6109c042d5bae8f0b Author: Jacob R. Edwards <jacob@jacobedwards.org> Date: Thu, 27 Apr 2023 20:34:40 -0700 Fix get command option parsing Diffstat:
M | srvbackup | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srvbackup b/srvbackup @@ -60,14 +60,14 @@ case "$c" in cat "$checksum" ;; (get) - if test "$1" -a "$1" = -c + if test $# -gt 0 -a "X$1" = X-c then shift write=compress else write=cat fi - test "$1" -a "$1" = "$(<"$checksum")" && + test "$#" -gt 0 -a "$1" = "$(<"$checksum")" && exit 0 $write < "$backup" ;;