Mercurial > hg > sonic-visualiser
diff deploy/linux/deploy-appimage.sh @ 1903:d2ee0bde1705 appimage
Attempt to follow exclusion list and name package from revision
author | Chris Cannam |
---|---|
date | Thu, 28 Jun 2018 15:31:32 +0100 |
parents | 4b772833fe1c |
children | 9bd1dea5f412 |
line wrap: on
line diff
--- a/deploy/linux/deploy-appimage.sh Thu Jun 28 13:11:46 2018 +0100 +++ b/deploy/linux/deploy-appimage.sh Thu Jun 28 15:31:32 2018 +0100 @@ -6,6 +6,19 @@ checker=vamp-plugin-load-checker piper=piper-vamp-simple-server +get_id() { + if [ -d .hg ]; then + hg id | sed 's/[+ ].*$//' + elif [ -d .git ]; then + git rev-parse --short HEAD + else + echo "WARNING: can't figure out revision from VCS metadata" 1>&2 + echo "unknown" + fi +} + +version=$(get_id) + targetdir="${program}.AppDir" echo "Target dir is $targetdir" @@ -29,9 +42,15 @@ local binary="$1" for lib in $(ldd "$binary" | egrep '=> (/usr)?(/local)?/lib/' | \ - sed 's/^.*=> //' | sed 's/ .*$//' | \ - grep -v 'libc.so' | grep -v 'libm.so'); do + sed 's/^.*=> //' | sed 's/ .*$//'); do + base=$(basename "$lib") + if grep -v '^#' sv-dependency-builds/linux/appimage/excludelist | + grep -q "^$base$" ; then + echo "excluding: $lib" + continue + fi + mkdir -p "$targetdir/$(dirname $lib)" if [ ! -f "$targetdir/$lib" ]; then @@ -65,5 +84,5 @@ cp sv-dependency-builds/linux/appimage/AppRun-x86_64 "$targetdir/AppRun" chmod +x "$targetdir/AppRun" -ARCH=x86_64 sv-dependency-builds/linux/appimage/appimagetool-x86_64.AppImage "$targetdir" +ARCH=x86_64 sv-dependency-builds/linux/appimage/appimagetool-x86_64.AppImage "$targetdir" "SonicVisualiser-$version-x86_64.AppImage"