Meta/Dothem: add '--clean' option
Junio C Hamano committed
Mar 13, 2023 at 09:51 UTC
860bc4360c4fcba0fe2df942984d87f8467af3df
1 file changed
+9
-4
Dothem
+9
-4
@@ -18,11 +18,12 @@ inst_prefix=$(
18
)
19
20
force= with_dash= test_long= M= install= doc= notest= bootstrap= branches= jobs=
21
-scratch= noprove= memtrash=--memtrash with_cocci= san=
21
+scratch= noprove= memtrash=--memtrash with_cocci= san= clean=
22
while case "$1" in
23
--pedantic | --locale=* | --loose) M="$M $1" ;;
24
--force) force=$1 ;;
25
--dash) with_dash=y ;;
26
+ --clean) clean=y ;;
27
--cocci) with_cocci=y ;;
28
--no-cocci) with_cocci= ;;
29
--long) test_long=--long ;;
@@ -192,13 +193,13 @@ do
193
cd "$BUILDBASE/$branch"
194
git reset --hard &&
195
195
- case "$scratch" in
196
+ case "$scratch$clean" in
197
'')
198
;;
198
- y)
199
+ *y*)
200
saveMeta=$(readlink Meta)
201
Meta/Make distclean
201
- git clean -f -x
202
+ git clean -f -x -d
203
ln -s "$saveMeta" Meta
204
;;
205
esac &&
@@ -211,6 +212,10 @@ do
212
git reset --hard || exit
213
esac &&
214
215
+ case "$clean" in
216
+ y) exit 0 ;;
217
+ esac &&
218
+
219
case "$private" in
220
'')
221
;;