aboutsummaryrefslogtreecommitdiffstats
path: root/appimage/AppRun
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2018-02-18 04:41:02 +0100
committerJay Berkenbilt <ejb@ql.org>2018-02-18 05:39:14 +0100
commit1e86f3ab70ad20971a800089ec531f567dcc58da (patch)
tree6719dd2d510dad9a046e271e153a7c9f44543356 /appimage/AppRun
parent356e71522856b73456bb82b3ddbd253f441fa209 (diff)
downloadqpdf-1e86f3ab70ad20971a800089ec531f567dcc58da.tar.zst
Complete .travis.yml and AppImage support (fixes #160, #161)
Diffstat (limited to 'appimage/AppRun')
-rw-r--r--appimage/AppRun19
1 files changed, 19 insertions, 0 deletions
diff --git a/appimage/AppRun b/appimage/AppRun
new file mode 100644
index 00000000..8a2e5935
--- /dev/null
+++ b/appimage/AppRun
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# The purpose of this custom AppRun script is
+# to allow symlinking the AppImage and invoking
+# the corresponding binary depending on which
+# symlink was used to invoke the AppImage
+
+HERE="$(dirname "$(readlink -f "${0}")")"
+
+if [ ! -z $APPIMAGE ] ; then
+ BINARY_NAME=$(basename "$ARGV0")
+ if [ -e "$HERE/usr/bin/$BINARY_NAME" ] ; then
+ exec "$HERE/usr/bin/$BINARY_NAME" "$@"
+ else
+ exec "$HERE/usr/bin/qpdf" "$@"
+ fi
+else
+ exec "$HERE/usr/bin/qpdf" "$@"
+fi