diff options
author | Karel Kočí <cynerd@email.cz> | 2020-07-29 12:24:54 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2020-07-29 12:24:54 +0200 |
commit | 563c1a29aef559be4742dfc1db1ff26915d11d8f (patch) | |
tree | a5799abb8e7ed79204569e80cd6ddb1903b736c4 /templates/turris.run | |
parent | b9b8ee5592865829b26f1d93aeb964c459424973 (diff) | |
download | laminar-cnf-563c1a29aef559be4742dfc1db1ff26915d11d8f.tar.gz laminar-cnf-563c1a29aef559be4742dfc1db1ff26915d11d8f.tar.bz2 laminar-cnf-563c1a29aef559be4742dfc1db1ff26915d11d8f.zip |
Correctly replae scp with sftp
It is not possible to run command on server side trought sftp so
reverting to just replacing scp with sftp command in place.
Diffstat (limited to 'templates/turris.run')
-rwxr-xr-x | templates/turris.run | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/templates/turris.run b/templates/turris.run index 46341ea..dfeaf06 100755 --- a/templates/turris.run +++ b/templates/turris.run @@ -68,8 +68,10 @@ echo_stage "Generate index and sign" $make package/index BUILD_KEY=~/openwrt-repo.sec echo_stage "Deploy" -sftp -b - upload:/var/www/repo <<EOF - !mkdir -p "turris/$ANIMAL" - !rm -rf "turris/$ANIMAL/$BOARD" - put -R "bin/packages/$ARCH/personal" "turris/$ANIMAL/$BOARD" +ssh upload rm -rf "deploy-turris-$ANIMAL-$BOARD" +scp -r "bin/packages/$ARCH/personal" upload:"deploy-turris-$ANIMAL-$BOARD" +ssh upload /bin/sh -e "$ANIMAL" "$BOARD" <<"EOF" + mkdir -p "/var/www/repo/turris/$1" + rm -rf "/var/www/repo/turris/$1/$2" + mv deploy-turris-$1-$2 "/var/www/repo/turris/$1/$2" EOF |