diff options
Diffstat (limited to 'mailimport')
-rwxr-xr-x | mailimport | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/mailimport b/mailimport index 76364aeea..bd6d36c2e 100755 --- a/mailimport +++ b/mailimport @@ -34,7 +34,7 @@ edit_patch() mv $tmp/$newfile $next; fi echo Editing $next - $EDITOR $next + $ED $next } #################################################################### @@ -80,7 +80,7 @@ apply_patch () { if [ "`grep '^Bad:' $TMP2`" != "" ]; then echo "*** ERROR: Patch bad formed. Please fix." sleep 1 - $EDITOR $next + $ED $next cont=1 fi done @@ -214,8 +214,20 @@ if [ "$TMPDIR" == "" ]; then TMPDIR=/tmp fi -if [ "$EDITOR" == "" ]; then - EDITOR="nano -w" +if [ "`which editdiff`" != "" ]; then + ED="editdiff" +else + ED=$EDITOR +fi + +if [ "$ED" == "" ]; then + if [ "`which nano`" != "" ]; then + ED="nano -w" + elif [ "`which pico`" != "" ]; then + ED="pico -w" + else + ED="vi" + fi fi if [ "$CHECKPATCH" == "" ]; then |