-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdeep-clean
executable file
·39 lines (35 loc) · 1.25 KB
/
deep-clean
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
#!/usr/bin/env bash
# ./deep-clean to test the waters (dry run)
# ./deep-clean -delete to blow it away
# ./deep-clean -delete all to blow everything away
# Quick sanity check, since we'd be deleting things
if [ ! -d grammars ] || [ ! -d tutorials ]; then
echo "Wrong directory? Run as ./deep-clean"
exit 1
fi
# Note: use ./* rather than . This avoids looking in .git
find ./build/ $1
find ./grammars/ -name "build.xml" $1
find ./* -name "*~" $1
find ./* -name "*.orig" $1
find ./test/ -name "build.xml" $1
find ./test/ -name "*.jar" $1
find ./test/ -name "*.test.output" $1
find ./test/ -name "*.copperdump.html" $1
find ./runtime/ -name "SilverRuntime.jar" $1
find ./grammars/ -name "*.jar" $1
find ./grammars/ -name "*.test.output" $1
find ./tutorials/ -name "*.test.output" $1
find ./tutorials/ -name "*.copperdump.html" $1
find ./tutorials/ -name "*.jar" $1
find ./tutorials/ -name "build.xml" $1
find ./tutorials/ -name "output.c" $1
find "build.xml" $1
find "silver.testing.bin.jar" $1
find ./runtime/lsp4j/target $1
find ./language-server/langserver/target $1
find ./language-server/launcher/target $1
find ./support/vs-code/silverlsp/out $1
if [ "$2" == "all" ]; then
rm -rf generated/src/* generated/bin/* runtime/java/bin/* generated/doc/*
fi