#!/bin/bash # cd $1 myfname=$(find . -name *.rel -type f | cut -d'.' -f2 | cut -d'/' -f2) for x in $myfname ; do /usr/bin/sdcc --model-small --code-loc 0x4000 --xram-loc 0x0000 $x.rel /usr/bin/packihx $x.ihx > $x.hex done;