add objcrun
This commit is contained in:
parent
575d43908f
commit
a467edc045
1 changed files with 13 additions and 0 deletions
13
objcrun
Executable file
13
objcrun
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
if [[ -f "$1" ]]; then
|
||||
NAME="$(basename ${1%.m})"
|
||||
BINPATH="/tmp/$NAME"
|
||||
clang -fobjc-arc -framework Foundation "$1" -o "$BINPATH" && "$BINPATH"
|
||||
elif [[ ! -z "$1" ]]; then
|
||||
echo "File not found: $1"
|
||||
exit 2
|
||||
else
|
||||
echo "Usage: $(basename $0) <filename.m>"
|
||||
exit 1
|
||||
fi
|
||||
Loading…
Reference in a new issue