summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rwxr-xr-xtemplates/alpine.run12
-rwxr-xr-xtemplates/turris.run12
2 files changed, 13 insertions, 11 deletions
diff --git a/templates/alpine.run b/templates/alpine.run
index e21958a..7ebec51 100755
--- a/templates/alpine.run
+++ b/templates/alpine.run
@@ -68,10 +68,12 @@ uroot cp "$FILES/alpine/abuild.conf" "$ROOT/etc/abuild.conf"
uchroot build 'buildrepo --purge --keep-going personal'
echo_stage "Deploy"
-ssh upload rm -rf "deploy-alpine"
-scp -r "$WORKSPACE/packages/personal/$ARCH" upload:"deploy-alpine-$ARCH"
-ssh upload /bin/sh -e <<EOF
- rm -rf "/var/www/repo/alpine/$ARCH"
+sftp -b - upload <<EOF
+ !rm -rf "deploy-alpine-$ARCH"
+ put "$WORKSPACE/packages/personal/$ARCH" "deploy-alpine-$ARCH"
+ !rm -rf "/var/www/repo/alpine/$ARCH"
mv "deploy-alpine-$ARCH" "/var/www/repo/alpine/$ARCH"
+
+ put "$FILES"/alpine/setup.sh /var/www/repo/alpine/
+ put "$FILES"/alpine/setup.sh.gpg /var/www/repo/alpine/
EOF
-scp "$FILES"/alpine/setup.sh{,.gpg} upload:/var/www/repo/alpine/
diff --git a/templates/turris.run b/templates/turris.run
index 98d489f..9392eee 100755
--- a/templates/turris.run
+++ b/templates/turris.run
@@ -63,10 +63,10 @@ echo_stage "Generate index and sign"
$make package/index BUILD_KEY=~/openwrt-repo.sec
echo_stage "Deploy"
-ssh upload rm -rf "deploy-turris-$ANIMAL-$BOARD"
-scp -r "bin/packages/$ARCH/personal" upload:deploy-turris-$ANIMAL-$BOARD
-ssh upload /bin/sh -e <<EOF
- 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 -d - upload <<EOF
+ !rm -rf "deploy-turris-$ANIMAL-$BOARD"
+ put "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"
EOF