First, thanks for the feedback.
WetDesertRock wrote:I realized that your script was including .DS_Store files.
Well, on Ubuntu it never occured to me that the zip command was adding hidden files ( .* ). Maybe it is different with mac.
It should now exclude every file beginning whith a dot. I'm not shure if it is a really good behaviour, though. And zip has its own ways of handling directories.
Code: Select all
EXCLUDE_FILES=$(/bin/ls -A | grep "^[.]" | tr '\n' ' ')
zip -9 -r $RELEASE_DIR/$PROJECT_NAME.love -x $0 $MAIN_RELEASE_DIR/\* ${PROJECT_ICNS##/*/} $EXCLUDE_FILES @ *
WetDesertRock wrote:(Also the desktop icon doesn't display for me?)
Turns out autocompletion had made me type PROJECT_FILE instead of PROJECT_NAME. It should work now.
kikito wrote:I could not get this script to work.
For kikito, I've reproduced the bug, and it is a pretty strange one.
The thing is, I'm trying to detect the Löve version to use by grep-ing the conf.lua file.
grep -Eo '[0-9]+.[0-9]+.[0-9]+' conf.lua is not enough, because the string can be found multiple times in the file.
So I thought of doing this:
Code: Select all
if [ -f conf.lua ]; then
LOVE_VERSION_CONF=$(grep -Eo 't.version = "[0-9]+.[0-9]+.[0-9]+"' conf.lua | grep -Eo '[0-9]+.[0-9]+.[0-9]+')
if [ -n $LOVE_VERSION_CONF ]; then
LOVE_VERSION=$LOVE_VERSION_CONF
fi
fi
If there is a conf.lua file, and if t.version is specified, it works well. But, if there's not...
if [ -n $LOVE_VERSION_CONF ] is still verified !
And more strange, both tests
-n and
-z are true !
So LOVE_VERSION gets a wrong value, bc outputs
(standard_in) 1: parse error and zip goes crazy.
I have removed this behaviour for the moment. If someone knows a right way to do this, please tell me.
By the way, there is a strange __MACOSX directoy in the new 0.9.1 .zip that we can download. Zip could ask if you want to replace it or not. It doesn't matter as it is not bundled with the final zip.