Chris@2390: #!/bin/bash Chris@2390: Chris@2390: set -eu Chris@2390: Chris@2390: current=$(hg id | awk '{ print $1; }') Chris@2390: Chris@2390: case "$current" in Chris@2390: *+) echo "ERROR: Current working copy has been modified - not proceeding"; exit 2;; Chris@2390: *);; Chris@2390: esac Chris@2390: Chris@2390: version=`perl -p -e 's/^[^"]*"([^"]*)".*$/$1/' version.h` Chris@2390: Chris@2390: echo -n "Proceed to rebuild and package version $version [Yn] ? " Chris@2390: read yn Chris@2390: Chris@2390: if [ -z "$yn" ]; then Chris@2390: yn=y Chris@2390: elif [ "$yn" = "Y" ]; then Chris@2390: yn=y Chris@2390: fi Chris@2390: Chris@2390: if [ "$yn" != "y" ]; then Chris@2390: exit 3 Chris@2390: fi Chris@2390: Chris@2390: echo "Proceeding" Chris@2390: Chris@2390: mkdir -p packages Chris@2390: Chris@2390: ./deploy/linux/build-and-test-appimage.sh Chris@2390: Chris@2390: squashedversion=$(echo "$version" | sed 's/_-//g') Chris@2390: Chris@2390: mv deploy/linux/docker/output/SonicVisualiser-"$current"-x86_64.AppImage \ Chris@2390: packages/SonicVisualiser-"$squashedversion"-x86_64.AppImage Chris@2390: Chris@2390: ./deploy/linux/build-and-test-deb.sh Chris@2390: Chris@2390: mv deploy/linux/docker/output/sonic-visualiser_"$version"_amd64.deb \ Chris@2390: packages/ Chris@2390: Chris@2390: echo "Done" Chris@2390: