3 if [ -z "$NACL_SDK_ROOT" ]; then
4 echo "The following variable needs to be set:
5 \$NACL_SDK_ROOT=$NACL_SDK_ROOT" >&2
9 if [ -z "$PNACL_FINALIZE" -o -z "$PNACL_TRANSLATE" ]; then
13 if [ ! -f "$exe" ]; then
14 $PNACL_FINALIZE "$1" -o "$1.final"
15 $PNACL_TRANSLATE -arch $(uname -m) "$1.final" -o "$exe"
19 command -v command >/dev/null 2>&1 || {
20 echo "command is required, but wasn't found on this system" >&2
24 command -v python >/dev/null 2>&1 || {
25 echo "Python not found. Aborting." >&2
29 SEL_LDR=$(find "$NACL_SDK_ROOT" -name sel_ldr.py | head -n 1)
30 if [ -z "$SEL_LDR" ]; then
31 echo "Couldn't find sel_ldr.py under $NACL_SDK_ROOT" >&2
35 exec python "$SEL_LDR" "$exe"