You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
999 B
36 lines
999 B
20 years ago
|
#!/bin/sh
|
||
|
##
|
||
|
## "dotest" is my stupid name for my patch-application script, which
|
||
|
## I never got around to renaming after I tested it. We're now on the
|
||
|
## second generation of scripts, still called "dotest".
|
||
|
##
|
||
20 years ago
|
## Update: Ryan Anderson finally shamed me into naming this "applymbox".
|
||
|
##
|
||
20 years ago
|
## You give it a mbox-format collection of emails, and it will try to
|
||
|
## apply them to the kernel using "applypatch"
|
||
|
##
|
||
20 years ago
|
## dotest [ -q ] mail_archive [Signoff_file]
|
||
|
##
|
||
20 years ago
|
rm -rf .dotest
|
||
|
mkdir .dotest
|
||
20 years ago
|
case $1 in
|
||
|
|
||
|
-q) touch .dotest/.query_apply
|
||
|
shift;;
|
||
|
esac
|
||
20 years ago
|
mailsplit $1 .dotest || exit 1
|
||
|
for i in .dotest/*
|
||
|
do
|
||
20 years ago
|
mailinfo .dotest/msg .dotest/patch < $i > .dotest/info || exit 1
|
||
20 years ago
|
git-stripspace < .dotest/msg > .dotest/msg-clean
|
||
20 years ago
|
applypatch .dotest/msg-clean .dotest/patch .dotest/info "$2"
|
||
20 years ago
|
ret=$?
|
||
|
if [ $ret -ne 0 ]; then
|
||
|
# 2 is a special exit code from applypatch to indicate that
|
||
|
# the patch wasn't applied, but continue anyway
|
||
|
[ $ret -ne 2 ] && exit $ret
|
||
|
fi
|
||
20 years ago
|
done
|
||
20 years ago
|
# return to pristine
|
||
|
rm -fr .dotest
|