Skip to content

Commit

Permalink
Merge pull request #847 from BLooD-DoG/patch-1
Browse files Browse the repository at this point in the history
Update create_osx_bundle.sh
  • Loading branch information
tcsabina authored Oct 20, 2023
2 parents e1a76d6 + e4a1249 commit abbffb9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions misc/install/create_osx_bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,20 @@ cp $(dirname $0)/$ICON_FILE $BUNDLE_NAME/Contents/Resources/.

echo '#!/bin/sh' > $BUNDLE_NAME/Contents/MacOS/ezquake
echo '' >> $BUNDLE_NAME/Contents/MacOS/ezquake
echo 'PNAME="$(dirname "$BASH_SOURCE")"' >> $BUNDLE_NAME/Contents/MacOS/ezquake
echo 'DIRNAME="$HOME"/Library/Application\ Support/ezQuake' >> $BUNDLE_NAME/Contents/MacOS/ezquake
echo 'DIRNAME2="$PNAME"/../../..' >> $BUNDLE_NAME/Contents/MacOS/ezquake
echo '' >> $BUNDLE_NAME/Contents/MacOS/ezquake
echo 'if [ ! -f "$DIRNAME"/id1/pak0.pak ]; then' >> $BUNDLE_NAME/Contents/MacOS/ezquake
echo 'if [ -f "$DIRNAME"/id1/pak0.pak ]; then' >> $BUNDLE_NAME/Contents/MacOS/ezquake
echo " exec \"\$PNAME\"/$BINARY -basedir \"\$DIRNAME\" \$*" >> $BUNDLE_NAME/Contents/MacOS/ezquake
echo 'elif [ -f "$DIRNAME2"/id1/pak0.pak ]; then' >> $BUNDLE_NAME/Contents/MacOS/ezquake
echo " exec \"\$PNAME\"/$BINARY -basedir \"\$DIRNAME2\" \$*" >> $BUNDLE_NAME/Contents/MacOS/ezquake
echo 'else' >> $BUNDLE_NAME/Contents/MacOS/ezquake
echo ' mkdir -p "$DIRNAME"/id1' >> $BUNDLE_NAME/Contents/MacOS/ezquake
echo ' touch "$DIRNAME"/id1/Copy\ your\ pak0.pak\ and\ pak1.pak\ files\ here.txt' >> $BUNDLE_NAME/Contents/MacOS/ezquake
echo ' osascript -e "tell app \"Finder\" to open (\"${DIRNAME}/id1/\" as POSIX file)"' >> $BUNDLE_NAME/Contents/MacOS/ezquake
echo ' osascript -e "tell app \"Finder\" to activate"' >> $BUNDLE_NAME/Contents/MacOS/ezquake
echo ' exit' >> $BUNDLE_NAME/Contents/MacOS/ezquake
echo 'fi' >> $BUNDLE_NAME/Contents/MacOS/ezquake
echo '' >> $BUNDLE_NAME/Contents/MacOS/ezquake
echo 'PNAME="$(dirname "$BASH_SOURCE")"' >> $BUNDLE_NAME/Contents/MacOS/ezquake
echo '' >> $BUNDLE_NAME/Contents/MacOS/ezquake
echo "exec \"\$PNAME\"/$BINARY -basedir \"\$DIRNAME\" \$*" >> $BUNDLE_NAME/Contents/MacOS/ezquake

chmod u+x $BUNDLE_NAME/Contents/MacOS/ezquake

Expand Down

0 comments on commit abbffb9

Please sign in to comment.