From db6a0025008fb215b21c42d13cefb0272b41f7dd Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Thu, 23 May 2019 00:28:24 +0200 Subject: [PATCH] AppImage: allow running the server using a fixed argument --- travis/appimage-script.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/travis/appimage-script.sh b/travis/appimage-script.sh index 252b8de..66d0676 100755 --- a/travis/appimage-script.sh +++ b/travis/appimage-script.sh @@ -38,13 +38,17 @@ chmod +x linuxdeploy*.sh # set up custom AppRun script cat > AppRun.sh <<\EAT -#! /bin/sh +#! /bin/bash # make sure to set APPDIR when run directly from the AppDir if [ -z $APPDIR ]; then APPDIR=$(readlink -f $(dirname "$0")); fi export LD_LIBRARY_PATH="$APPDIR"/usr/lib export PATH="$PATH":"$APPDIR"/usr/bin -exec "$APPDIR"/usr/bin/python "$APPDIR"/usr/bin/syncplay "$@" +if [ "$1" == "--server" ]; then + exec "$APPDIR"/usr/bin/python "$APPDIR"/usr/bin/syncplay-server "${@:2}" +else + exec "$APPDIR"/usr/bin/python "$APPDIR"/usr/bin/syncplay "$@" +fi EAT chmod +x AppRun.sh