Kicad Gerber renaming script for OSHPark (and seeed etc) submission

The following short script renames the standard Kicad Gerber output filenames to those used by OSHPark and other PCB fabrication services. Put the script in the same directory as your gerbers, set execute permissions and run it. Make sure all the output files (including the drill file) are present before running the script. Let me know if you find any issues.

front=`ls  *-F_Cu.gbr`
projname=`basename $front \-F_Cu.gbr`

mv *-F_Cu.gbr $projname.GTL
mv *-B_Cu.gbr $projname.GBL
mv *-F_Mask.gbr $projname.GTS
mv *-B_Mask.gbr $projname.GBS
mv *-F_SilkS.gbr $projname.GTO
mv *-B_SilkS.gbr $projname.GBO
mv *-Edge_Cuts.gbr $projname.GKO
mv *.drl $projname.XLN