5 echo "Usage: clean [-b] [-p] [-c] [-all]"
6 echo "Repository cleaning script."
7 echo " -b Delete the binary output directory."
8 echo " -p Delete the repo-local NuGet package directory."
9 echo " -c Delete the user-local NuGet package caches."
10 echo " -all Cleans repository and restores it to pristine state."
12 echo "If no option is specified, then \"clean.sh -b\" is implied."
16 if [ "$1" == "-?" ] || [ "$1" == "-h" ]; then
20 # Implement VBCSCompiler.exe kill logic once VBCSCompiler.exe is ported to unixes
22 __working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
26 echo "Removing all untracked files in the working tree"
27 git clean -xdf $__working_tree_root
29 elif [ $# == 0 ] || [ "$*" == "-b" ]; then
30 __args="/t:CleanAllProjects"
31 elif [ "$*" == "-p" ]; then
32 __args="/t:CleanPackages"
33 elif [ "$*" == "-c" ]; then
34 __args="/t:CleanPackagesCache"
38 $__working_tree_root/dotnet.sh msbuild /nologo /verbosity:minimal /clp:Summary /flp:v=normal\;LogFile=clean.log $__args