8 echo "./cleanCMake.sh [options]"
9 echo " -c Basic cmake clean functionality [cmake --build ${BUILD_DIR} -j 1 --target clean]"
10 echo " -i Remove cmake binary installs [xargs rm < ${BUILD_DIR}/install_manifest.txt]"
11 # echo " -l Remove symlinks (WPS) [ find ${TEST_DIR} -type l -exec rm {} \; ]"
12 echo " -f Remove build & install folders (WPS) [ rm ${BUILD_DIR} -r; rm ${INSTALL_DIR}/ -r ]"
13 echo " -a Remove all (WPS), equivalent to -f (more specifically -c -i -f)"
16 CLEAN_BASIC_BUILD
=FALSE
17 CLEAN_BASIC_INSTALL
=FALSE
22 while getopts "hcilfa" opt
; do
25 CLEAN_BASIC_BUILD
=TRUE
28 CLEAN_BASIC_INSTALL
=TRUE
46 if [[ $OPTIND -eq 1 ]]; then
47 # Do basic clean I guess
48 CLEAN_BASIC_BUILD
=TRUE
51 if [[ "${CLEAN_BASIC_BUILD}" == "TRUE" ||
"${CLEAN_ALL}" == "TRUE" ]]; then
52 echo "Doing cmake make clean"
54 cd ${BUILD_DIR} && make -j 1 clean
; cd $OLD_DIR
57 if [[ "${CLEAN_BASIC_INSTALL}" == "TRUE" ||
"${CLEAN_ALL}" == "TRUE" ]]; then
58 echo "Removing binary installs"
59 xargs rm < ${BUILD_DIR}/install_manifest.txt
62 # if [[ "${CLEAN_LINKS}" == "TRUE" || "${CLEAN_ALL}" == "TRUE" ]]; then
63 # echo "Removing all symlinks in ${TEST_DIR}"
64 # find ${TEST_DIR} -type l -exec rm {} \;
67 if [[ "${CLEAN_FOLDERS}" == "TRUE" ||
"${CLEAN_ALL}" == "TRUE" ]]; then
68 echo "Deleting ${BUILD_DIR} & ${INSTALL_DIR}/"
69 rm ${BUILD_DIR} -r; rm ${INSTALL_DIR}/ -r