aboutsummaryrefslogtreecommitdiff
path: root/build_deploy.sh
blob: 7d2320e71d8985ddc5de5877e6a457aa92f71967 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

cd "$(dirname "$0")"

./build_repo.sh "$@" || exit $?

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
}

if [ -d repo/omnia -a -d .omnia-sdk ]; then
	deploy omnia
fi
if [ -d repo/turris -a -d .turris-sdk ]; then
	deploy turris
fi