5 echo "Usage: clean [-b] [-t] [-p]"
6 echo "Repository cleaning script."
7 echo " -b Clean bin directory"
8 echo " -t Clean tools directory"
9 echo " -p Clean packages directory"
10 echo " -all Clean everything"
12 echo "If no option is specified, then \"clean.sh -b -t -p\" is implied."
16 # Obtain the location of the bash script to figure out where the root of the repo is.
17 __ProjectRoot="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
19 echo Cleaning previous output for the selected configuration
54 if [ "$clean_bin" == true ]; then
55 echo "Deleting bin directory"
56 rm -rf "$__ProjectRoot/bin"
58 echo "Error while deleting bin directory - error code was $?"
63 if [ "$clean_tools" == true ]; then
64 echo "Deleting tools directory"
65 rm -rf "$__ProjectRoot/Tools"
67 echo "Error while deleting tools directory - error code was $?"
72 if [ "$clean_packages" == true ]; then
73 echo "Deleting packages directory"
74 rm -rf "$__ProjectRoot/packages"
76 echo "Error while deleting packages directory - error code was $?"
81 echo "Clean was successful"