Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fail on OSX Yosemeite #36

Open
Vrak opened this issue Jul 26, 2017 · 2 comments
Open

Build fail on OSX Yosemeite #36

Vrak opened this issue Jul 26, 2017 · 2 comments

Comments

@Vrak
Copy link

Vrak commented Jul 26, 2017

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 Vrak closed this as completed Jul 26, 2017
@Vrak Vrak reopened this Jul 26, 2017
@z
Copy link
Collaborator

z commented Jul 27, 2017

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

@Vrak
Copy link
Author

Vrak commented Jul 27, 2017

Thanks @z. I'll try that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants