plan9port/bin/9a

15 lines
205 B
Bash
Executable file

#!/bin/sh
if [ $# != 1 ]; then
echo 'usage: 9a file.s' 1>&2
exit 1
fi
aflags=""
case "`uname`" in
Darwin)
aflags="-arch `arch`"
esac
out=`echo $1 | sed 's/\.s$//;s/$/.o/'`
exec as $aflags -o $out $1