Skip to content

Commit b9f04cd

Browse files
Create separate Clean and Clobber functions. Clean only removes outputs and Clobber removes outputs and container setup. (#491)
Signed-off-by: Afonso Oliveira <[email protected]> Co-authored-by: Derek Hower <[email protected]>
1 parent 58a94be commit b9f04cd

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

Rakefile

100644100755
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ task :clean do
112112
warn "Don't run clean using Rake. Run `./do clean` (alias for `./bin/clean`) instead."
113113
end
114114

115+
desc "Clean up all generated files and container"
116+
task :clobber do
117+
warn "Don't run clean using Rake. Run `./do clean` (alias for `./bin/clean`) instead."
118+
end
119+
120+
115121
namespace :test do
116122
task :insts do
117123
puts "Checking instruction encodings..."

bin/clean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
ROOT=$(dirname $(dirname $(realpath ${BASH_SOURCE[0]})))
44

5-
rm -rf ${ROOT}/.stamps ${ROOT}/.home ${ROOT}/.bundle ${ROOT}/.singularity ${ROOT}/gen ${ROOT}/node_modules
5+
rm -rf ${ROOT}/.stamps ${ROOT}/gen

bin/clobber

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
ROOT=$(dirname $(dirname $(realpath $BASH_SOURCE[0])))
4+
5+
rm -rf ${ROOT}/.stamps ${ROOT}/.home ${ROOT}/.bundle ${ROOT}/.singularity ${ROOT}/gen ${ROOT}/node_modules

do

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
ROOT=$(dirname $(realpath ${BASH_SOURCE[0]}))
44

5-
if [ "$1" == "clean" ]; then
5+
if [ "$1" == "clobber" ]; then
6+
${ROOT}/bin/clobber
7+
exit $?
8+
elif [ "$1" == "clean" ]; then
69
${ROOT}/bin/clean
710
exit $?
811
fi

0 commit comments

Comments
 (0)