1#!/bin/sh2##3## "dotest" is my stupid name for my patch-application script, which4## I never got around to renaming after I tested it. We're now on the5## second generation of scripts, still called "dotest".6##7## You give it a mbox-format collection of emails, and it will try to8## apply them to the kernel using "applypatch"9##10## dotest [ -q ] mail_archive [Signoff_file]11##12rm -rf .dotest13mkdir .dotest14case $1 in1516-q) touch .dotest/.query_apply17shift;;18esac19mailsplit $1 .dotest || exit 120for i in .dotest/*21do22mailinfo .dotest/msg .dotest/patch .dotest/file < $i > .dotest/info || exit 123stripspace < .dotest/msg > .dotest/msg-clean24applypatch .dotest/msg-clean .dotest/patch .dotest/file .dotest/info "$2"25ret=$?26if [ $ret -ne 0 ]; then27# 2 is a special exit code from applypatch to indicate that28# the patch wasn't applied, but continue anyway29[ $ret -ne 2 ] && exit $ret30fi31done32# return to pristine33rm -fr .dotest