From: Alexander Barton Date: Wed, 8 Apr 2015 09:48:20 +0000 (+0200) Subject: Use original script file name instead of "run.sh" X-Git-Url: https://arthur.barton.de/gitweb/?p=appify.git;a=commitdiff_plain;h=97524bbed75009a29c9f4bcbd167c94d8624cc6d Use original script file name instead of "run.sh" This is nicer and we can wrap other scripts than shell: like Perl, Python, Ruby, ... --- diff --git a/appify.sh b/appify.sh index 45c6ea2..1ebf8bb 100755 --- a/appify.sh +++ b/appify.sh @@ -43,6 +43,8 @@ fi SCRIPT=$1 TARGET=$2 +BASENAME=`basename "$SCRIPT"` + if [ -e "$TARGET" ]; then echo "$TARGET exists, exiting" 1>&2 exit 3 @@ -68,7 +70,7 @@ cat <"$TARGET/Contents/Info.plist" CFBundleExecutable - run.sh + ${BASENAME} CFBundleIconFile CFBundleInfoDictionaryVersion @@ -83,5 +85,5 @@ cat <"$TARGET/Contents/Info.plist" EOF -cp "$SCRIPT" "$TARGET/Contents/MacOS/run.sh" -chmod 755 "$TARGET/Contents/MacOS/run.sh" +cp "$SCRIPT" "$TARGET/Contents/MacOS/$BASENAME" +chmod 755 "$TARGET/Contents/MacOS/$BASENAME"