-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathclean.sh
More file actions
executable file
·85 lines (80 loc) · 1.62 KB
/
clean.sh
File metadata and controls
executable file
·85 lines (80 loc) · 1.62 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/bin/bash
source ./defaults
## Available Commands:
# $PWD/clean.sh git.cleanup
# $PWD/clean.sh git.cleanup.(cache)
# $PWD/clean.sh tmp.cleanup
do_clean() {
$PWD/git.sh reset
}
do_update() {
$PWD/git.sh update
}
if [[ "$1" == *git.cleanup* ]]; then
do_clean
do_update
env | sort >> Results/env/clean.env && echo "" >> Results/env/clean.env
if [[ "$1" == *git.cleanup.cache* ]]; then
rm -r -f .git/Cache
fi
chmod -R +x Buildscripts/
chmod -R +x Configs/
mkdir -p .git/Cache
pushd Builds/
for dev in $LIST
do
for loc in $VARIANTS
do
find $dev$loc/. ! -type d -delete
touch $dev$loc/tmp
done
find $dev/. ! -type d -delete
touch $dev/tmp
done
for arch in $ARCHS
do
find $arch/. ! -type d -delete
touch $arch/tmp
done
popd
pushd Results/
rm -f *.info && rm -f release.* && rm -f *.set && rm -f logs/*.log && rm -f env/*.env
find . ! -type d -delete # Will be removed
cp ../defaults defaults.set
for con in $TARGETS
do
mkdir -p $con
find $con/. ! -type d -delete
touch $con/tmp
done
touch env/tmp
touch logs/tmp
popd
fi
if [ "$1" = "tmp.cleanup" ]; then
pushd Builds/
for dev in $LIST
do
for loc in $VARIANTS
do
rm -f $dev$loc/tmp
done
rm -f $dev/tmp
done
for arch in $ARCHS
do
rm -f $arch/tmp
done
popd
pushd Results/
rm -f /tmp/release.last.* && rm -f release.last.*
rm -f sys.* && rm -f status.*
for con in $TARGETS
do
rm -f $con/tmp
done
rm -f env/tmp
rm -f logs/tmp
popd
fi
exit 0