Skip to content

Commit b453fed

Browse files
committed
DoKernelOrg: add --clean-stage
1 parent 4982920 commit b453fed

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

DoKernelOrg

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ln_or_cp () {
66
ln -f "$@" || cp -f "$@"
77
}
88

9-
STAGE= narch= arch= master= jobs= rpm=t final=
9+
STAGE= narch= arch= master= jobs= rpm=t final= clean_stage=
1010
G=/pub/software/scm/git
1111
THIS=$(git describe HEAD)
1212

@@ -18,6 +18,7 @@ do
1818
-j*) jobs="$1" ;;
1919
--dist-only) rpm=f ;;
2020
--stage=?*) STAGE=${1#--stage=} ;;
21+
--clean-stage) clean_stage=t ;;
2122
--final) final=t ;;
2223
--pub=?*) G=${1#--pub=} ;;
2324
*) echo >&3 "Eh? $1"; exit 1 ;;
@@ -30,6 +31,20 @@ do
3031
STAGE="${STAGE%/}"
3132
done
3233

34+
if test -n "$clean_stage" && test -d "$STAGE/$G"
35+
then
36+
echo -n "Remove $STAGE/$G [y/N]? "
37+
read yesno
38+
case "$yesno" in
39+
[yY])
40+
rm -fr "$STAGE/$G" &&
41+
mkdir -p "$STAGE/$G" || exit ;;
42+
*)
43+
echo "Not removing, then"
44+
exit 0 ;;
45+
esac
46+
fi
47+
3348
if test -z "$master"
3449
then
3550
case "$(hostname)" in
@@ -97,8 +112,10 @@ then
97112
) || exit
98113
make clean
99114
echo >&2 "Done -- move RPMS to the master machine."
100-
(cd $HOME/rpms && sha1sum TARPIT/$V.$arch.$dist.tar) >&2
101115
echo >&2 "scp $HOME/rpms/TARPIT/$V.$arch.$dist.tar master.kernel.org:rpms/TARPIT"
116+
echo >&2 "sha1sum -c <<\EOF"
117+
(cd $HOME/rpms && sha1sum TARPIT/$V.$arch.$dist.tar) >&2
118+
echo >&2 "EOF"
102119
exit
103120
fi
104121

0 commit comments

Comments
 (0)