#! /bin/sh INPATH=$1 INFILE=$(basename $1) INFILENAME="${INFILE%.*}" INEXT="${INFILE##*.}" gcc -m32 -nostartfiles -nostdlib -ffreestanding "$INPATH" -o "tmp/$INFILENAME".o objcopy -S -R .note.gnu.build-id -R .comment -O binary "tmp/$INFILENAME".o "bin/$INFILENAME".bin rm "tmp/$INFILENAME".o