summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2020-07-29 13:44:03 +0200
committerKarel Kočí <cynerd@email.cz>2020-07-29 13:44:03 +0200
commita5ea8f08f0e89ed6166e662f1f457b842953a27d (patch)
treed0d6420bf6608ffb4847a2cb7998767951bea391
parente375a0e9347e29181adb2e5e5f021ff97d345426 (diff)
downloadlaminar-cnf-a5ea8f08f0e89ed6166e662f1f457b842953a27d.tar.gz
laminar-cnf-a5ea8f08f0e89ed6166e662f1f457b842953a27d.tar.bz2
laminar-cnf-a5ea8f08f0e89ed6166e662f1f457b842953a27d.zip
Another try in using sftp
-rwxr-xr-xjobs/turris-updater-conf.run9
-rwxr-xr-xtemplates/alpine.run9
-rwxr-xr-xtemplates/turris.run4
3 files changed, 14 insertions, 8 deletions
diff --git a/jobs/turris-updater-conf.run b/jobs/turris-updater-conf.run
index 5ab91e6..03c8ac0 100755
--- a/jobs/turris-updater-conf.run
+++ b/jobs/turris-updater-conf.run
@@ -9,9 +9,8 @@ echo_stage "Signing"
signify -S -s ~/openwrt-repo.sec -m pkgs/updater.lua
echo_stage "Deploy"
-sftp -r pkgs/updater.lua{,.sig} upload:
-ssh upload /bin/sh -e <<EOF
- mkdir -p "/var/www/repo/turris"
- mv updater.lua "/var/www/repo/turris/updater.lua"
- mv updater.lua.sig "/var/www/repo/turris/updater.lua.sig"
+ssh upload mkdir -p "/var/www/repo/turris"
+sftp -b - <<EOF
+ put pkgs/updater.lua /var/www/repo/turris/updater.lua
+ put pkgs/updater.lua.sig /var/www/repo/turris/updater.lua.sig
EOF
diff --git a/templates/alpine.run b/templates/alpine.run
index a65fb84..2132576 100755
--- a/templates/alpine.run
+++ b/templates/alpine.run
@@ -69,9 +69,14 @@ uchroot build 'buildrepo --purge --keep-going personal'
echo_stage "Deploy"
ssh upload rm -rf "deploy-alpine"
-sftp -r "$WORKSPACE/packages/personal/$ARCH" upload:"deploy-alpine-$ARCH"
+sftp -b - upload <<EOF
+ put -R "$WORKSPACE/packages/personal/$ARCH" "deploy-alpine-$ARCH"
+EOF
ssh upload /bin/sh -e "$ARCH" <<"EOF"
rm -rf "/var/www/repo/alpine/$1"
mv "deploy-alpine-$1" "/var/www/repo/alpine/$1"
EOF
-sftp "$FILES"/alpine/setup.sh{,.gpg} upload:/var/www/repo/alpine/
+sftp -b - upload:/var/www/repo/alpine/ <<EOF
+ put "$FILES"/alpine/setup.sh"
+ put "$FILES"/alpine/setup.sh.gpg"
+EOF
diff --git a/templates/turris.run b/templates/turris.run
index 01ff8e3..19295a5 100755
--- a/templates/turris.run
+++ b/templates/turris.run
@@ -69,7 +69,9 @@ $make package/index BUILD_KEY=~/openwrt-repo.sec
echo_stage "Deploy"
ssh upload rm -rf "deploy-turris-$ANIMAL-$BOARD"
-sftp -r "bin/packages/$ARCH/personal" upload:"deploy-turris-$ANIMAL-$BOARD"
+sftp -d - upload <<EOF
+ put -R "./bin/packages/$ARCH/personal" "deploy-turris-$ANIMAL-$BOARD"
+EOF
ssh upload /bin/sh -e "$ANIMAL" "$BOARD" <<"EOF"
mkdir -p "/var/www/repo/turris/$1"
rm -rf "/var/www/repo/turris/$1/$2"