Skip to content

Commit 0854d45

Browse files
committed
Fix GHE_PARALLEL_RSYNC_COMMAND_OPTIONS
1 parent 0a4e7d5 commit 0854d45

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

share/github-backup-utils/ghe-backup-config

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ ghe_backup_finished() {
199199

200200
ghe_parallel_check() {
201201
GHE_PARALLEL_COMMAND_OPTIONS=()
202+
GHE_PARALLEL_RSYNC_COMMAND_OPTIONS=()
202203

203204
if [ "$GHE_PARALLEL_ENABLED" != "yes" ]; then
204205
return 0
@@ -234,12 +235,12 @@ ghe_parallel_check() {
234235
fi
235236

236237
if [ -n "$GHE_PARALLEL_RSYNC_MAX_JOBS" ]; then
237-
GHE_PARALLEL_RSYNC_COMMAND_OPTIONS="-j $GHE_PARALLEL_RSYNC_MAX_JOBS"
238+
GHE_PARALLEL_RSYNC_COMMAND_OPTIONS+=(-j "$GHE_PARALLEL_RSYNC_MAX_JOBS")
238239
fi
239240

240241
if [ -n "$GHE_PARALLEL_MAX_LOAD" ]; then
241242
GHE_PARALLEL_COMMAND_OPTIONS+=(-l "$GHE_PARALLEL_MAX_LOAD")
242-
GHE_PARALLEL_RSYNC_COMMAND_OPTIONS+=" -l $GHE_PARALLEL_MAX_LOAD"
243+
GHE_PARALLEL_RSYNC_COMMAND_OPTIONS+=(-l "$GHE_PARALLEL_MAX_LOAD")
243244
fi
244245
}
245246

share/github-backup-utils/ghe-restore-repositories

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ for file_list in $tempdir/git-server-*.rsync; do
171171
done
172172

173173
if [ "$GHE_PARALLEL_ENABLED" = "yes" ]; then
174-
$GHE_PARALLEL_COMMAND $GHE_PARALLEL_RSYNC_COMMAND_OPTIONS -- "${rsync_commands[@]}"
174+
"$GHE_PARALLEL_COMMAND" "${GHE_PARALLEL_RSYNC_COMMAND_OPTIONS[@]}" -- "${rsync_commands[@]}"
175175
else
176176
for c in "${rsync_commands[@]}"; do
177177
eval "$c"

share/github-backup-utils/ghe-restore-storage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ for file_list in $tempdir/*.rsync; do
152152
done
153153

154154
if [ "$GHE_PARALLEL_ENABLED" = "yes" ]; then
155-
$GHE_PARALLEL_COMMAND $GHE_PARALLEL_RSYNC_COMMAND_OPTIONS -- "${rsync_commands[@]}"
155+
"$GHE_PARALLEL_COMMAND" "${GHE_PARALLEL_RSYNC_COMMAND_OPTIONS[@]}" -- "${rsync_commands[@]}"
156156
else
157157
for c in "${rsync_commands[@]}"; do
158158
eval "$c"

0 commit comments

Comments
 (0)