4coder»Forums
Jonathan
3 posts
SOLVED - build.sh on macos
Edited by Jonathan on
I get a permissions denied error when I build on 4coder.

this is my whole build.sh file

clang -framework CoreVideo -framework IOKit -framework Cocoa -framework GLUT -framework OpenGL libraylib.a game.c -o ../build/game


in terminal if i enter

bash build.sh <------ this works

./build.sh <------ this doesn't work
Mārtiņš Možeiko
2199 posts / 1 project
SOLVED - build.sh on macos
Edited by Mārtiņš Možeiko on
Not sure what this has to do with 4coder, but add
1
#/!bin/bash
as first line.
11 posts
SOLVED - build.sh on macos
It's
1
#!/bin/bash
. More generally it's
1
#!
followed by the interpreter for the file. What this does is it makes the OS run the interpreter instead of the script (which is only a text file, not actual machine code) - and the name of the script file will be added implicitly as last command-line argument for the interpreter process. (often it's also supported to give additional arguments after the
1
#!
and interpreter).
Jonathan
3 posts
SOLVED - build.sh on macos
yup, I thought I tried this, but must have done something wrong, worked fine.

I had a feeling it wasn't 4coder related, but didn't know where else to ask.
Jonathan
3 posts
SOLVED - build.sh on macos
For other noobs like me (or future me), run

chmod +x build.sh

to change the scripts access permissions