diff --git a/rebuildkolabnow.sh b/rebuildkolabnow.sh index 03cb367..ecc5d2c 100755 --- a/rebuildkolabnow.sh +++ b/rebuildkolabnow.sh @@ -1,15 +1,20 @@ -#!/bin/bash +#!/usr/bin/env bash #Make the script independent of the calling location parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) cd "$parent_path" -mkdir -p kolabnow-repo -mkdir -p kolabnow-build +mkdir -p kolabnow +cd kolabnow + +mkdir -p repo +mkdir -p build #Kube -flatpak-builder --force-clean --ccache --gpg-homedir=gpg --gpg-sign=3467EC817EDD7956DDFA874C94306134D868808A --repo=kolabnow-repo --subject="Build of Kube `date`" kolabnow-build kube/com.kolabnow.kube.json || exit 1 +flatpak-builder --force-clean --ccache --gpg-homedir=../gpg --gpg-sign=3467EC817EDD7956DDFA874C94306134D868808A --repo=repo --subject="Build of Kube `date`" build ../kube/com.kolabnow.kube.json || exit 1 #Finalize -flatpak build-update-repo kolabnow-repo --prune --prune-depth=20 --generate-static-deltas --gpg-homedir=gpg --gpg-sign=3467EC817EDD7956DDFA874C94306134D868808A || exit 1 +flatpak build-update-repo repo --prune --prune-depth=20 --generate-static-deltas --gpg-homedir=../gpg --gpg-sign=3467EC817EDD7956DDFA874C94306134D868808A || exit 1 #This is only necessary if not building signed from start -flatpak build-sign kolabnow-repo com.kolabnow.kube --gpg-homedir=gpg --gpg-sign=3467EC817EDD7956DDFA874C94306134D868808A || exit 1 +flatpak build-sign repo com.kolabnow.kube --gpg-homedir=../gpg --gpg-sign=3467EC817EDD7956DDFA874C94306134D868808A || exit 1 + +cd .. diff --git a/uploadkolabnow.sh b/uploadkolabnow.sh index b24f821..3cf75d4 100755 --- a/uploadkolabnow.sh +++ b/uploadkolabnow.sh @@ -1,12 +1,10 @@ #!/bin/bash #Make the script independent of the calling location parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) cd "$parent_path" -UPLOADDIR=/var/www/kolabnow.com/kube/public_html/kube/flatpak - -rsync -Paz --delete -e 'ssh -oBatchMode=yes' kolabnow-repo/ mollekopf@10.9.2.98:$UPLOADDIR/repo/ -#The ostreesync script avoids race conditions if people are accessing the mirror while we're uploading stuff. -# ./ostreesync.py --rsync-opt='-P' --src kolabnow-repo/ --dest mollekopf@10.9.2.98:$UPLOADDIR/repo/ || exit 1 -scp -B kube/com.kolabnow.kube.flatpakref mollekopf@10.9.2.98:$UPLOADDIR/ || exit 1 +UPLOADDIR=/var/www/vhosts/kube-project.com/files.kube-project.com/kolabnowflatpak +SSHSERVER=kube-project@10.4.2.23 +rsync -Paz --delete -e 'ssh -oBatchMode=yes' kolabnow/repo/ $SSHSERVER:$UPLOADDIR/repo/ +scp -B kube/com.kolabnow.kube.flatpakref $SSHSERVER:$UPLOADDIR/ || exit 1