3 installDirectory
=install
7 echo "./cleanCMake.sh [options]"
8 echo " -c [Default if no options] Basic cmake clean functionality [make -j 1 clean]"
9 echo " -b Remove cmake binary installs [xargs rm < ${buildDirectory}/install_manifest.txt]"
10 echo " -f Remove build & install folders (WRF) [ rm ${buildDirectory} -r; rm ${installDirectory}/ -r ]"
11 echo " -a Remove all (WRF), equivalent to -c -b -f (more specifically -c then -b then-f)"
12 echo "Specific builds/installs"
13 echo " -d directory Specify operating on particular build directory"
14 echo " -i directory Specify operating on particular install directory"
18 cleanBasicInstall
=FALSE
23 while getopts "hcbfad:i:" opt
; do
29 cleanBasicInstall
=TRUE
38 buildDirectory
=$OPTARG
41 installDirectory
=$OPTARG
50 if [ $OPTIND -eq 1 ]; then
51 # Do basic clean I guess
55 if [ "${cleanBasicBuild}" = "TRUE" ] ||
[ "${cleanAll}" = "TRUE" ]; then
56 echo "Doing cmake make clean"
58 cd ${buildDirectory} && make -j 1 clean
> /dev
/null
2>&1; cd $OLD_DIR
61 if [ "${cleanBasicInstall}" = "TRUE" ] ||
[ "${cleanAll}" = "TRUE" ]; then
62 echo "Removing binary installs"
63 xargs rm < ${buildDirectory}/install_manifest.txt
> /dev
/null
2>&1
66 if [ "${cleanFolders}" = "TRUE" ] ||
[ "${cleanAll}" = "TRUE" ]; then
67 echo "Deleting ${buildDirectory} & ${installDirectory}/"
68 rm ${buildDirectory} -r; rm ${installDirectory}/ -r > /dev
/null
2>&1