summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-04-02 20:35:02 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-04-02 20:35:02 -0400
commit3dc344054a701379528ca5de256210ce232c8cc3 (patch)
tree20e79b673bdcff467a633e2b7b5b55fd606d460d
parent0d5b4e9983dd30fc7c586c22d69d54cd44e7a627 (diff)
downloadSMAPI-3dc344054a701379528ca5de256210ce232c8cc3.tar.gz
SMAPI-3dc344054a701379528ca5de256210ce232c8cc3.tar.bz2
SMAPI-3dc344054a701379528ca5de256210ce232c8cc3.zip
don't overwrite .bin.osx file unnecessarily to avoid resetting file permissions (#768)
-rw-r--r--docs/release-notes.md1
-rw-r--r--src/SMAPI.Installer/assets/unix-launcher.sh7
2 files changed, 7 insertions, 1 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md
index 3d505b8b..a9074ba9 100644
--- a/docs/release-notes.md
+++ b/docs/release-notes.md
@@ -9,6 +9,7 @@
## Upcoming release
* For players:
+ * On macOS, the `StardewModdingAPI.bin.osx` file is no longer overwritten if it's identical to avoid resetting file permissions (thanks to 007wayne!).
* Fixed `world_clear` console command not removing resource clumps outside the farm and secret woods.
## 3.9.5
diff --git a/src/SMAPI.Installer/assets/unix-launcher.sh b/src/SMAPI.Installer/assets/unix-launcher.sh
index 1d97d487..93bf58d8 100644
--- a/src/SMAPI.Installer/assets/unix-launcher.sh
+++ b/src/SMAPI.Installer/assets/unix-launcher.sh
@@ -37,8 +37,13 @@ if [ "$UNAME" == "Darwin" ]; then
ln -s /Library/Frameworks/Mono.framework/Versions/Current/lib/libgdiplus.dylib libgdiplus.dylib
fi
+ # create bin file
+ # Note: don't overwrite if it's identical, to avoid resetting permission flags
+ if [ ! -x StardewModdingAPI.bin.osx ] || ! cmp StardewValley.bin.osx StardewModdingAPI.bin.osx >/dev/null 2>&1; then
+ cp -p StardewValley.bin.osx StardewModdingAPI.bin.osx
+ fi
+
# launch SMAPI
- cp StardewValley.bin.osx StardewModdingAPI.bin.osx
open -a Terminal ./StardewModdingAPI.bin.osx "$@"
else
# choose launcher