| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- #!/bin/sh
- cd $PWD
- if test ! -f stamp.$1
- then
- flist="`find src -name \*.c`"
- cfiles="`grep -l \"def [H|L][U|E][B|A]\" $flist`"
- echo "[*] Cleaning up files for $1 build"
- for s in $cfiles
- do
- bleh="`echo $s | cut -d / -f 2`";
- if [ $bleh = "mod" ]; then
- #echo "src/mod/irc.mod/cmdsirc.c" | cut -d / -f 3
- #elif [ $1 = "binary" ]; then
- mod="`echo $s | cut -d / -f 3`";
- os="`echo src/mod/$mod | sed s/\\\.mod/\\\.o/g`";
- # echo "deleting $os"
- rm -f $os
- # fi
- else
- os="`echo $s | sed s/\\\.c/\\\.o/g`";
- if test -f $os
- then
- if test "`file $os | grep ELF`"
- then
- # echo "Deleting $os"
- rm -f $os
- else
- if test "`file $os | grep object`"
- then
- # echo "Deleting $os"
- rm -f $os
- fi
- fi
- fi
- fi
- done
- fi
- rm -f stamp.*
- touch stamp.$1
|