summaryrefslogtreecommitdiff
path: root/mailimport
diff options
context:
space:
mode:
Diffstat (limited to 'mailimport')
-rwxr-xr-xmailimport18
1 files changed, 12 insertions, 6 deletions
diff --git a/mailimport b/mailimport
index edbde0e06..1f6c15668 100755
--- a/mailimport
+++ b/mailimport
@@ -33,13 +33,19 @@ TMP2=$DIR/patchheader
apply_patch () {
next=$1
+ pdir=linux
- echo patch -s -t -p1 --dry-run -l -N -d linux -i $next
- patch -s -t -p1 --dry-run -l -N -d linux -i $next
+ echo patch -s -t -p1 --dry-run -l -N -d $pdir -i $next
+ patch -s -t -p1 --dry-run -l -N -d $pdif -i $next
if [ "$?" != "0" ]; then
- $head $next
- echo "*** ERROR"
- exit
+ pdir=.
+ echo patch -s -t -p1 --dry-run -l -N -d $pdir -i $next
+ patch -s -t -p1 --dry-run -l -N -d $pdir -i $next
+ if [ "$?" != "0" ]; then
+ $head $next
+ echo "*** ERROR"
+ exit
+ fi
fi
nano $next
@@ -84,7 +90,7 @@ apply_patch () {
echo hg -m "`cat $TMP2|grep -v "^#"`" qnew $name
hg qnew -m "`cat $TMP2|grep -v "^#"`" $name
- patch -s -t -p1 -l -N -d linux -i $next
+ patch -s -t -p1 -l -N -d $pdir -i $next
hg qrefresh
}