summaryrefslogtreecommitdiff
path: root/dev-lang/luajit/files/luac.jit
blob: 2f700641d6bc7ec8649bd2486d64e8553ede7455 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env sh
help() {
	echo "This binary is only wrapper for LuaJIT-not-ready software"
	echo "You should use 'luajit -b' if you want to compile bytecode manually."
	exit 0;
}

out="luac.out"
i=1;
if [[ ${#} = 0 ]]; then help; fi
for args in "${@}"; do
case $args in
	-o)
		shift ${i}
		out="${1}"
		shift 1
		i=0
		;;
	-v)
		luajit -v
		exit 0;
		;;
	-p)
		out="/dev/null"
		;;
	--help)
		help
		;;
esac
let i=${i}+1
done;
luajit -b "${@}" "${out}"