-
Notifications
You must be signed in to change notification settings - Fork 0
/
clean.sh
executable file
·57 lines (47 loc) · 1.6 KB
/
clean.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
# Copyright (c) 2018 Bill Adams. All Rights Reserved.
# Bill Adams licenses this file to you under the MIT license.
# See the license.txt file in the project root for more information.
#Make sure we are working in our source directory
cd $(dirname $BASH_SOURCE)
#Source the variables.
. common.sh
#
#
#------------------------------------------------------------------------------
function clean_bin {
for SRC_DIR in "src" "test" "benchmark"; do
for BASE_MODULE in "${DOTNET_MODULE_DIRS[@]}"; do
for EXTRA in '' '.Test' '.Benchmark'; do
MODULE="$BASE_MODULE$EXTRA"
if [ -e "$SRC_DIR/$MODULE" ]; then
echo "Cleaning $SRC_DIR/$MODULE"
for SUBDIR in bin obj BenchmarkDotNet.Artifacts; do
OBJ_DIR="$SRC_DIR/$MODULE/$SUBDIR";
if [ -e "$OBJ_DIR" ]; then
echo
echo "Cleaning $OBJ_DIR"
echo "rm -rfv $OBJ_DIR"
rm -rfv "$OBJ_DIR"
#elif $DEBUG; then
# echo "NOTE: $OBJ_DIR does not exist"
fi
done
fi
done
done
done
}
#
#
#------------------------------------------------------------------------------
function clean_temp_files {
for FILE in $TEMP_FILES; do
find . -name "$FILE" -print -delete
done
}
#
#
#==============================================================================
clean_bin;
clean_temp_files;