Reputation: 978
I cloned the DuckDuckGo open source iOS project on my machine. When I compile the code I got an Shell Script Invocation Error from Xcode:
/Users/nirbhay/Library/Developer/Xcode/DerivedData/DuckDuckGo-fbzkqkdplgwdyzbcwxtfiydcqkfj/Build/Intermediates/DuckDuckGo.build/Debug-iphonesimulator/Mogenerator.build/Script-5BFF24C116F77F0700844D3B.sh:
line 3: /usr/local/bin/mogenerator: No such file or directory
I installed mogenerator from a DMG. It seems the mogenerator was put into the /usr/bin/ directory instead of /usr/local/bin/ directory where Xcode expected it. So I manually created the bin directory in local/ and copied the mogenerator file there. The code compiles now.
I am not an expert so what I did seems like a hack to me. Can anybody tell me why this happened in the first place and if there was a right way to do this?
Upvotes: 1
Views: 775
Reputation: 539915
mogenerator is called from a shell script in the "Build Phases" of the target. In your case, it seems that mogenerator is called with an absolute path
/usr/local/bin/mogenerator --model ...
If mogenerator is installed in /usr/bin/ then you can change that line to
/usr/bin/mogenerator --model ...
or simply
mogenerator --model ...
because /usr/bin/ is in the default search path of Xcode.
Upvotes: 3