Source
echo "*** The directory '$root' does not look like valid CASA root."
function usage ()
{
echo "usage: prepareCleanBuild [ rootDirectory ] [ buildType ]"
exit 0
}
if [ "$1" = "-h" -o "$1" = "--help" ]; then
usage
fi
if [ $# -eq 1 ]; then
if [ -d "$trunk/code/build/$1" ]; then
root=$trunk
type=$1
else
root=$1
type="Debug"
fi
elif [ $# -eq 2 ]; then
type=$1
root=$2
elif [ $# -eq 0 ]; then
root=$trunk
type="Debug"
else
usage
fi
if [ ! -d $root ]; then
echo "*** The argument '$root' is not a directory."
usage
fi
cd $root
if [ -d asap -a -d code -a -d casacore -a -d gcwrap ]; then
echo "Cleaning build artifacts below $root."
echo
set -o xtrace
rm -rf asap/build/$type/*
rm -rf code/build/$type/*
rm -rf casacore/build/$type/*
rm -rf gcwrap/build/$type/*
rm -rf linux_64b/$type/*
set +o xtrace