added section for fixing duplicate files
[feisty_meow.git] / scripts / clam / make_subdirs.sh
1 #!/bin/bash
2
3 # travels down each subdirectory and builds using make.
4 function make_subdirectories()
5 {
6   # keep the variable local to avoid contaminating
7   # other runs.
8   local burlap51
9
10   # find all the subdirectories.
11   for burlap51 in $(find . -mindepth 1 -maxdepth 1 -type d); do
12     # make sure there's a makefile there.
13     if [ -f "$burlap51/makefile" ]; then
14 #echo -e "\n\n[[inside barriers, with filename=$burlap51 and all conditions met]]\n\n"
15       pushd "$burlap51" &>/dev/null
16       make --silent -I "$CLAM_SCRIPTS" NOT_FIRST_MAKE=t 
17       popd &>/dev/null
18     else
19       echo "(skipping directory $burlap51)"
20     fi
21   done
22 }
23
24 # executes our subdirectory make function.
25 make_subdirectories $*
26