summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <karel.koci@nic.cz>2020-07-27 11:34:43 +0200
committerKarel Kočí <karel.koci@nic.cz>2020-07-27 11:34:43 +0200
commit2021859b9b7698a5dbb066385e2fd20681bae6b2 (patch)
tree479ac6a9236a0dcf60f4744de33ccfd1f0f86d65
parentff60b9aaf34c4509b680680c8bf63b891de0402b (diff)
downloadlaminar-cnf-2021859b9b7698a5dbb066385e2fd20681bae6b2.tar.gz
laminar-cnf-2021859b9b7698a5dbb066385e2fd20681bae6b2.tar.bz2
laminar-cnf-2021859b9b7698a5dbb066385e2fd20681bae6b2.zip
turris: fix and improve sftp
It seems that it is not possible to access absolute paths from sftp.
-rwxr-xr-xtemplates/turris.run10
1 files changed, 4 insertions, 6 deletions
diff --git a/templates/turris.run b/templates/turris.run
index 0471c0a..9c2bc0c 100755
--- a/templates/turris.run
+++ b/templates/turris.run
@@ -63,10 +63,8 @@ echo_stage "Generate index and sign"
$make package/index BUILD_KEY=~/openwrt-repo.sec
echo_stage "Deploy"
-sftp -b - upload <<EOF
- !rm -rf "deploy-turris-$ANIMAL-$BOARD"
- put -R "bin/packages/$ARCH/personal" "deploy-turris-$ANIMAL-$BOARD"
- !mkdir -p "/var/www/repo/turris/$ANIMAL"
- !rm -rf "/var/www/repo/turris/$ANIMAL/$BOARD"
- mv "deploy-turris-$ANIMAL-$BOARD" "/var/www/repo/turris/$ANIMAL/$BOARD"
+sftp -b - upload:/var/www/repo <<EOF
+ !mkdir -p "turris/$ANIMAL"
+ !rm -rf "turris/$ANIMAL/$BOARD"
+ put -R "bin/packages/$ARCH/personal" "/var/www/repo/turris/$ANIMAL/$BOARD"
EOF