From 97524bbed75009a29c9f4bcbd167c94d8624cc6d Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Wed, 8 Apr 2015 11:48:20 +0200 Subject: [PATCH] Use original script file name instead of "run.sh" This is nicer and we can wrap other scripts than shell: like Perl, Python, Ruby, ... --- appify.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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" -- 2.39.2