Register
4coder»Forums»SOLVED - build.sh on macos
Jonathan
3 posts
SOLVED - build.sh on macos
1 month, 1 week ago Edited by Jonathan on May 31, 2020, 3:20 a.m.
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
2089 posts / 1 project
build.sh on macos
1 month, 1 week ago Edited by Mārtiņš Možeiko on May 30, 2020, 8:17 a.m.
Not sure what this has to do with 4coder, but add
1
#/!bin/bash
as first line.
10 posts
build.sh on macos
1 month ago
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
1 month ago
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
4 days, 15 hours ago
For other noobs like me (or future me), run

chmod +x build.sh

to change the scripts access permissions