From eb2a1a6dcea0a0ea3a31f76234529550e56ce482 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Sat, 24 Feb 2018 21:42:21 -0600 Subject: [PATCH] Don't abort if no symlink exists. --- package/deploy/sftp-symlink.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package/deploy/sftp-symlink.sh b/package/deploy/sftp-symlink.sh index 623892c04..d88c0638d 100755 --- a/package/deploy/sftp-symlink.sh +++ b/package/deploy/sftp-symlink.sh @@ -24,8 +24,9 @@ if [ -s $KEY ]; then filepath=$(readlink -f "$i") filepath=$(basename $filepath) tmpfile=$(mktemp) - echo "rm Slic3r-${current_branch}-latest.${EXT}" > $tmpfile - echo "symlink $filepath Slic3r-${current_branch}-latest.${EXT} " >> $tmpfile + + echo "rm Slic3r-${current_branch}-latest.${EXT}" | sftp -i$KEY "${UPLOAD_USER}@dl.slic3r.org:$DIR/" + echo "symlink $filepath Slic3r-${current_branch}-latest.${EXT} " > $tmpfile sftp -b $tmpfile -i$KEY "${UPLOAD_USER}@dl.slic3r.org:$DIR/" result=$? if [ $? -eq 1 ]; then