summaryrefslogtreecommitdiff
path: root/debian/patches/rsync-unquoted.patch
blob: daaa12a054c2c9b1e68002885796b7ce0cb0dcd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Description: Make the rsync invocation a bit more shell-friendly
 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.
Bug-Debian: https://bugs.debian.org/1027490
Origin: upstream, https://gitlab.com/ppentchev/repopush/-/commit/772cc3f43367c4e3c8ba767c75ecb7d7ca5a058c
Author: Peter Pentchev <roam@ringlet.net>
Last-Update: 2023-01-03

--- 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 @@
 {
 	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()