Hello,
I can’t find the way how to launch sh file from Post-export Shell Command in Projucer.
When I try to do that from terminal I have no problem, everything works fine.
I can run on many ways: ./myScript.sh
or sh myScript.sh
or bash myScript.sh
And as I told from terminal everything works fine, but when I write such command in Projucer Post-export Shell Command(macOS, Linux) I get error:
Shell command: /bin/sh -c bash myScript.sh failed with code: 127
I also tried that: sh %%1%%/Scripts/GetCurrentBranchName.sh
Then I get no error but the script is not executed it just looks like nothing happens.
For any help great thanks in advance.
Great thanks for your help Szemek, but nothing help.
I tried all your suggestions, and I get rid of “failed with code: 127”, now there is no error, but the script is just not executed.
Hello,
I finally find out what was wrong. Unfortunately my script was wrong
That script worked only if it was launched from directory where he is. But from any other directory not.
So now inside my sh file I use absolute path to all files and commands.
I get that absolute path by: MYDIR="$( dirname "$( which "$0" )" )"
Now everything works fine, great thanks for your help.