Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/common-functions
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common-functions')
-rwxr-xr-xlib/common-functions6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/common-functions b/lib/common-functions
index 110578f..b64af00 100755
--- a/lib/common-functions
+++ b/lib/common-functions
@@ -871,6 +871,12 @@ failsafe_sftp() {
trial_counter=20
trap 'rm -rf --one-file-system "${temp_dir}"' EXIT
cat > "${temp_dir}/input"
+ if [ -n "${master_mirror_sftp_root}" ]; then
+ sed -i '
+ /^\(rm\|rename\) / s@"\([^"]\+\)"@"'"${master_mirror_sftp_root}"'/\1"@g
+ /^ln / s@"\([^"]\+\)"$@"'"${master_mirror_sftp_root}"'/\1"@
+ ' "${temp_dir}/input"
+ fi
sed -n '
s/^rm "\([^"]\+\)"$/- \1/
s/^ln\( [^"]\S*\)* "[^"]\+" "\([^"]\+\)"$/+ \2/