diff options
author | Peter Pentchev <roam@ringlet.net> | 2023-01-03 02:52:54 +0200 |
---|---|---|
committer | Peter Pentchev <roam@debian.org> | 2023-01-03 02:52:54 +0200 |
commit | 0e50c3fc247581a18fa572e6722ee8ad9a716392 (patch) | |
tree | 3333dab4c273d0bff448fdb6f4b9b8e88ba30106 | |
parent | 5cf13e020215934bc37da9463d4fd58e645cab21 (diff) |
Make the rsync invocation a bit more shell-friendlyHEADarchive/debian/0.1.0-3master
Bug-Debian: https://bugs.debian.org/1027490
Origin: upstream, https://gitlab.com/ppentchev/repopush/-/commit/772cc3f43367c4e3c8ba767c75ecb7d7ca5a058c
Last-Update: 2023-01-03
Version 0.9 of the shellcheck utility shows a new diagnostic message for
our rsync invocation with unquoted $noop, $v, and $delete variables, so
make what we are trying to do there fully explicit.
Gbp-Pq: Name rsync-unquoted.patch
-rwxr-xr-x | repopush.sh | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/repopush.sh b/repopush.sh index 880587e..ad1d8b9 100755 --- a/repopush.sh +++ b/repopush.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2020, 2021 Peter Pentchev <roam@ringlet.net> +# Copyright (c) 2020 - 2023 Peter Pentchev <roam@ringlet.net> # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -99,8 +99,7 @@ rsync_step() { local n="$1" ntotal="$2" desc="$3" path="$4" delete="$5" debug "- $n/$ntotal: $desc" - # shellcheck disable=SC2086 - rsync $noop $v -az $delete -- "$locpath$path/" "$remote$path/" + rsync ${noop:+-n} ${v:+-v} -az ${delete:+--delete} -- "$locpath$path/" "$remote$path/" } sync_debrepo() |