diff --git a/bin/foamBinDirs b/bin/foamBinDirs index ef96dee328..5922cf8628 100755 --- a/bin/foamBinDirs +++ b/bin/foamBinDirs @@ -47,8 +47,9 @@ baseArch=$(echo "$arch" | sed -e 's@[DS]P.*$@@') # get list of directories ( for dir in \ - $packDir/lib/$arch \ $packDir/applications/bin/$arch \ + $packDir/bin/$arch \ + $packDir/lib/$arch \ $packDir/wmake/rules \ $packDir/wmake/bin/$baseArch \ ; diff --git a/bin/foamPackBin b/bin/foamPackBin index 3a6358f597..251691d0dd 100755 --- a/bin/foamPackBin +++ b/bin/foamPackBin @@ -60,15 +60,23 @@ then fi # check for essential directories -for dir in $packDir $packDir/lib/$arch $packDir/applications/bin/$arch +for dir in $packDir $packDir/lib/$arch do - if [ ! -d $dir ] - then + [ -d $dir ] || { echo "Error: directory $dir does not exist" exit 1 - fi + } done +# this changed - check for either +[ -d $packDir/bin/$arch -o -d $packDir/applications/bin/$arch ] || { + echo "Error: one of these directories must exist:" + echo " $packDir/bin/$archdir" + echo " $packDir/applications/bin/$archdir" + exit 1 +} + + # get list of directories dirList=`foamBinDirs $packDir $arch` diff --git a/wmake/wcleanAll b/wmake/wcleanAll index 997ceb7a29..a037adab3d 100755 --- a/wmake/wcleanAll +++ b/wmake/wcleanAll @@ -43,10 +43,13 @@ fi exit 1 } -for dir in lib applications/bin +for dir in lib bin applications/bin do - echo "Removing $dir/" - [ -d $dir ] && rm -rf $dir/* + echo "Removing non-tools directories from $dir/" + if [ -d $dir ] + then + find $dir -mindepth 1 -type d \! -name tools | xargs rm -rf + fi done echo "Removing *.dep files" diff --git a/wmake/wcleanMachine b/wmake/wcleanMachine index 533273def1..485e455411 100755 --- a/wmake/wcleanMachine +++ b/wmake/wcleanMachine @@ -62,7 +62,7 @@ do # find . -depth -type d \( -name ii_files -o -name Templates.DB \) -exec rm -rf {} \; - for dir in lib/$machType applications/bin/$machType + for dir in lib/$machType bin/$machType applications/bin/$machType do [ -d $dir ] && rm -rf $dir done