modpack icon indicating copy to clipboard operation
modpack copied to clipboard

Build fail on OSX Yosemeite

Open Vrak opened this issue 8 years ago • 2 comments

Attempting to build in:/Library/Application Support/xonotic/modpack Running OSX 10.10.5

vrakbook:modpack vrak$ ./build.sh
readlink: illegal option -- f
usage: readlink [-n] [file ...]
./build.sh: line 20: cd: /Library/Application: No such file or directory

line 20 of build.sh is: b=; s=$(cd $(readlink -f ${1%%/}); pwd); d=$(cd $2; pwd) pwd outputs /Library/Application Support/xonotic/modpack so the remainder of the path is ignored.

I used cd /Library/Application\ Support/xonotic/modpack to enter the directory, so that would be the correct path (that's how you cd into it), however I'm not sure how to edit build.sh to solve this. pwd does not output the \ that's needed where a path contains a space.

Vrak avatar Jul 26 '17 22:07 Vrak

First issue is readlink on OSX does not have the -f, --canonicalize flag in the BSD implementation:

canonicalize  by following every symlink in every component of the given name recursively;
all but the last component must exist

Some methods to bring this behavior to OSX are dirty, the BASH example in the thread below seems the cleanest in the sense that it's cross-platform without requiring an additional language (such as the perl-based solutions)

https://stackoverflow.com/questions/1055671/how-can-i-get-the-behavior-of-gnus-readlink-f-on-a-mac

z avatar Jul 27 '17 00:07 z

Thanks @z. I'll try that.

Vrak avatar Jul 27 '17 03:07 Vrak