Commit a1698191 authored by Mark Olesen's avatar Mark Olesen
Browse files

ENH: adjust tools to handle architecture-specific dirs in bin/ as well

parent b9be5a6f
......@@ -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 \
;
......
......@@ -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`
......
......@@ -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"
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment