diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-11-05 11:55:52 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-11-05 13:16:23 -0800 |
commit | 6ce4239884780fafdf641fa52a2a8c7a0a02450d (patch) | |
tree | 978eb031b8eb899988796e37c211e0c07adac34b /scripts/build.sh | |
parent | 138f0255f85f26fcfd2a414e2a34a987c695a141 (diff) | |
download | subsurface-6ce4239884780fafdf641fa52a2a8c7a0a02450d.tar.gz |
build.sh: add option to create appdir
This makes it easier to create an AppImage from the build artifacts.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'scripts/build.sh')
-rwxr-xr-x | scripts/build.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/build.sh b/scripts/build.sh index b5704af8a..5b2e11cbc 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -55,6 +55,10 @@ while [[ $# -gt 0 ]] ; do BUILD_MOBILE="1" BUILD_DESKTOP="1" ;; + -create-appdir) + # we are building an AppImage as by product + CREATE_APPDIR="1" + ;; *) echo "Unknown command line argument $arg" ;; @@ -485,4 +489,15 @@ for (( i=0 ; i < ${#BUILDS[@]} ; i++ )) ; do LIBRARY_PATH=$INSTALL_ROOT/lib make -j4 LIBRARY_PATH=$INSTALL_ROOT/lib make install + + if [ "$CREATE_APPDIR" = "1" ] ; then + # if we create an AppImage this makes gives us a sane starting point + cd $SRC + mkdir -p ./appdir + mkdir -p appdir/usr/share/metainfo + mkdir -p appdir/usr/share/icons/hicolor/256x256/apps + cp -r ./install-root/* ./appdir/usr + cp subsurface/appdata/subsurface.appdata.xml appdir/usr/share/metainfo/ + cp subsurface/icons/subsurface-icon.png appdir/usr/share/icons/hicolor/256x256/apps/ + fi done |