All pastes #209511 Raw Edit

Stuff

public shellscript v1 · immutable
#209511 ·published 2006-10-19 06:01 UTC
rendered paste body
#!/bin/shif [ -z "$1" ]; then echo "usage: $0 executable_name"; exit; figpp="g++ -ansi -Wall -g"for cppfile in *.cpp; do	ofile=`echo $cppfile|grep -oe "[^.]*"`.o	ofiles=$ofiles$ofile" "doneecho -e "$1 : $ofiles\n\t$gpp -o $@ $ofiles\n"shiftfor ofile in $ofiles; do	cppfile=`echo $ofile|grep -oe "[^.]*"`.cpp	hfiles=`cat $cppfile|grep -oe '#include "[^"]*'|cut -b "11-"|tr '\n' ' '`	echo -e "$ofile : $cppfile $hfiles\n\t$gpp -c $@ $cppfile\n";doneecho -e "clean :\n\trm -f $0 $ofiles"