comparison 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
comparison
equal deleted inserted replaced
1901:4b772833fe1c 1903:d2ee0bde1705
3 set -eu 3 set -eu
4 4
5 program=sonic-visualiser 5 program=sonic-visualiser
6 checker=vamp-plugin-load-checker 6 checker=vamp-plugin-load-checker
7 piper=piper-vamp-simple-server 7 piper=piper-vamp-simple-server
8
9 get_id() {
10 if [ -d .hg ]; then
11 hg id | sed 's/[+ ].*$//'
12 elif [ -d .git ]; then
13 git rev-parse --short HEAD
14 else
15 echo "WARNING: can't figure out revision from VCS metadata" 1>&2
16 echo "unknown"
17 fi
18 }
19
20 version=$(get_id)
8 21
9 targetdir="${program}.AppDir" 22 targetdir="${program}.AppDir"
10 23
11 echo "Target dir is $targetdir" 24 echo "Target dir is $targetdir"
12 25
27 add_dependencies() { 40 add_dependencies() {
28 41
29 local binary="$1" 42 local binary="$1"
30 43
31 for lib in $(ldd "$binary" | egrep '=> (/usr)?(/local)?/lib/' | \ 44 for lib in $(ldd "$binary" | egrep '=> (/usr)?(/local)?/lib/' | \
32 sed 's/^.*=> //' | sed 's/ .*$//' | \ 45 sed 's/^.*=> //' | sed 's/ .*$//'); do
33 grep -v 'libc.so' | grep -v 'libm.so'); do
34 46
47 base=$(basename "$lib")
48 if grep -v '^#' sv-dependency-builds/linux/appimage/excludelist |
49 grep -q "^$base$" ; then
50 echo "excluding: $lib"
51 continue
52 fi
53
35 mkdir -p "$targetdir/$(dirname $lib)" 54 mkdir -p "$targetdir/$(dirname $lib)"
36 55
37 if [ ! -f "$targetdir/$lib" ]; then 56 if [ ! -f "$targetdir/$lib" ]; then
38 57
39 cp -Lv "$lib" "$targetdir/$lib" 58 cp -Lv "$lib" "$targetdir/$lib"
63 cp "icons/sv-icon.svg" "$targetdir/" 82 cp "icons/sv-icon.svg" "$targetdir/"
64 83
65 cp sv-dependency-builds/linux/appimage/AppRun-x86_64 "$targetdir/AppRun" 84 cp sv-dependency-builds/linux/appimage/AppRun-x86_64 "$targetdir/AppRun"
66 chmod +x "$targetdir/AppRun" 85 chmod +x "$targetdir/AppRun"
67 86
68 ARCH=x86_64 sv-dependency-builds/linux/appimage/appimagetool-x86_64.AppImage "$targetdir" 87 ARCH=x86_64 sv-dependency-builds/linux/appimage/appimagetool-x86_64.AppImage "$targetdir" "SonicVisualiser-$version-x86_64.AppImage"
69 88