1
Fork 0
hare-nix/pkgs/hare-as

38 lines
702 B
Plaintext
Raw Normal View History

2024-05-14 19:06:04 +00:00
set -o pipefail
function header() {
echo
echo
echo "# ----------------------------------------------------------------"
echo ".file \"$1\""
echo "# ----------------------------------------------------------------"
echo
}
args=
code=
until [ $# -eq 0 ]; do
case $1 in
--)
;;
-o|-I|-arch)
args="$args $1 $2"
shift
;;
-*)
args="$args $1"
;;
*)
# file="$(fix_asm $1)"
# # IFS=$'\n'
file=$(cat "$1")
code="$code$(header $1)"$'\n'"$file"
;;
esac
shift
done
echo "jer"
echo "$code" | fix_asm | as $args -