aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-02-02 00:19:40 +0100
committerKarel Kočí <cynerd@email.cz>2018-02-02 00:20:38 +0100
commit325e49b4a7420133e446bd873e94555f9e9cd9b7 (patch)
tree0f3ba50a390d6803991d35ecedddccdb355c7e14
parent39fc564b94530c84697c7324f50d6c16316fd18f (diff)
downloadturris-myrepo-325e49b4a7420133e446bd873e94555f9e9cd9b7.tar.gz
turris-myrepo-325e49b4a7420133e446bd873e94555f9e9cd9b7.tar.bz2
turris-myrepo-325e49b4a7420133e446bd873e94555f9e9cd9b7.zip
Add build_deploy.sh
This is replacement for now more generalized build_repo.sh
-rwxr-xr-xbuild_deploy.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/build_deploy.sh b/build_deploy.sh
new file mode 100755
index 0000000..80572d0
--- /dev/null
+++ b/build_deploy.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+cd "$(dirname "$0")"
+
+./build_repo.sh "$@"
+
+deploy() {
+ local TARGET="cynerd.cz:/var/www/myrepo"
+ ssh cynerd.cz -- mkdir -p "/var/www/myrepo/$1" # Make sure that directory exists
+ echo -e "\e[1;34mDeploy $1\e[0m"
+ scp repo/$1/* $TARGET/$1/
+
+ .$1-sdk/staging_dir/host/bin/usign -S -s key.sec -m $1.lua
+ scp $1.lua $TARGET/$1.lua
+ scp $1.lua.sig $TARGET/$1.lua.sig
+ rm $1.lua.sig
+}
+
+[ ! -d repo/omnia ] || deploy omnia
+[ ! -d repo/turris ] || deploy turris