#! /bin/sh # # This is a shell script that converts exmh-2.0 to exmh-2.0.1 # TOP=. findBinary() { IFS=: for i in $PATH; do test -x $i/$1 && return done echo "Fatal error: this shell script requires $2." exit 1 } findBinary patch "Larry Wall's patch program" Patch() { echo "Patch $1:" patch -s $TOP/$1 } NewFile() { echo "New file $1" cat >$TOP/$1 } NewDir() { echo "New directory $1" mkdir "$TOP/$1" } RmDir() { echo "Remove directory $1" rm -rf $TOP/$1.orig mv $TOP/$1 $TOP/$1.orig } RmFile() { echo "Remove $1" rm -f $TOP/$1.orig mv $TOP/$1 $TOP/$1.orig } Patch exmh.CHANGES<<'EOF-EOF-EOF' *** exmh-2.0/exmh.CHANGES Mon Dec 22 13:34:29 1997 --- exmh-2.0.1/exmh.CHANGES Tue Dec 23 10:58:55 1997 *************** *** 1,5 **** HISTORY ! 2.0 12/23/97 Merry Christmas Fixed geometry bug in installer. Added PgpDecryptExpect to distribution. Added "wm command ." for WindowMaker. --- 1,12 ---- HISTORY ! 2.0.1 12/23/97 Ba Humbug ! Fixed mime.tcl to delete temp files ! Changed sedit.tcl so SeditFormatMail is called, even if you will do MHN ! Folded in some patches from John Beck: ! Enhanced sedit.tcl to add x-mailer headers in all cases. ! Beefed up post.tcl to fix a bug and add Organization headers. ! ! 2.0 12/22/97 Merry Christmas Fixed geometry bug in installer. Added PgpDecryptExpect to distribution. Added "wm command ." for WindowMaker. EOF-EOF-EOF Patch exmh.README<<'EOF-EOF-EOF' *** exmh-2.0/exmh.README Mon Dec 22 11:15:43 1997 --- exmh-2.0.1/exmh.README Tue Dec 23 10:59:54 1997 *************** *** 1,5 **** ! Last modified: Mon Dec 22 11:14:56 PST 1997 ! exmh version: 2.0 Brent.Welch@eng.sun.com exmh is a TCL/TK based interface to the MH mail system. --- 1,5 ---- ! Last modified: Tue Dec 23 10:59:51 PST 1997 ! exmh version: 2.0.1 Brent.Welch@eng.sun.com exmh is a TCL/TK based interface to the MH mail system. EOF-EOF-EOF Patch exmh.install<<'EOF-EOF-EOF' *** exmh-2.0/exmh.install Mon Dec 22 13:37:45 1997 --- exmh-2.0.1/exmh.install Tue Dec 23 10:50:46 1997 *************** *** 14,21 **** source ./install.tcl set program exmh ! set vers 2.0 ! set date 12/22/97 if [catch {file join a b}] { if {$tk_version == 4.1} { --- 14,21 ---- source ./install.tcl set program exmh ! set vers 2.0.1 ! set date 12/23/97 if [catch {file join a b}] { if {$tk_version == 4.1} { EOF-EOF-EOF Patch lib/mime.tcl<<'EOF-EOF-EOF' *** exmh-2.0/lib/mime.tcl Tue Nov 25 13:39:30 1997 --- exmh-2.0.1/lib/mime.tcl Tue Dec 23 09:43:54 1997 *************** *** 194,200 **** proc Mime_Cleanup {{tkw default}} { global mime mimeHdr mimeContentId ! File_Delete $mime(junkfiles) set mime(junkfiles) {} catch {unset mimeHdr} --- 194,200 ---- proc Mime_Cleanup {{tkw default}} { global mime mimeHdr mimeContentId ! eval File_Delete $mime(junkfiles) set mime(junkfiles) {} catch {unset mimeHdr} EOF-EOF-EOF Patch lib/post.tcl<<'EOF-EOF-EOF' *** exmh-2.0/lib/post.tcl Fri Oct 3 14:41:29 1997 --- exmh-2.0.1/lib/post.tcl Tue Dec 23 10:41:31 1997 *************** *** 43,49 **** # proc Post {} { ! global NNTP msg if [string length $msg(path)] { set art [open $msg(path) r] --- 43,49 ---- # proc Post {} { ! global NNTP msg env if [string length $msg(path)] { set art [open $msg(path) r] *************** *** 77,82 **** --- 77,84 ---- set headerin [split $hdr \n] set NNTP(headers) {} set flag 0 + set NNTP(post_groups) $NNTP(groups) + set organization 0 # parse headers and dispose of as necessary foreach h $headerin { *************** *** 107,119 **** } elseif {[string first from: $lh]==0} { set NNTP(sender) [string trim [string range $h 5 end]] } elseif {[string first newsgroups: $lh]==0} { ! set NNTP(groups) [string trim [string range $h 11 end]] } elseif {[string first subject: $lh]==0} { set NNTP(subject) [string trim [string range $h 8 end]] } else { lappend NNTP(headers) $h } } Post_Widget --- 109,127 ---- } elseif {[string first from: $lh]==0} { set NNTP(sender) [string trim [string range $h 5 end]] } elseif {[string first newsgroups: $lh]==0} { ! set NNTP(post_groups) [string trim [string range $h 11 end]] } elseif {[string first subject: $lh]==0} { set NNTP(subject) [string trim [string range $h 8 end]] + } elseif {[string first organization: $lh]==0} { + set organization 1 } else { lappend NNTP(headers) $h } } + if {$organization==0 && [info exists env(ORGANIZATION)]} { + set org_hdr "Organization: $env(ORGANIZATION)" + lappend NNTP(headers) $org_hdr + } Post_Widget *************** *** 136,142 **** frame .exmh_post.ng -borderwidth 2 label .exmh_post.ng.l -text Newsgroups: -width 12 ! entry .exmh_post.ng.e -textvariable NNTP(groups) \ -relief sunken -width 60 pack .exmh_post.ng.l -side left -fill both pack .exmh_post.ng.e -side left -fill both -expand 1 --- 144,150 ---- frame .exmh_post.ng -borderwidth 2 label .exmh_post.ng.l -text Newsgroups: -width 12 ! entry .exmh_post.ng.e -textvariable NNTP(post_groups) \ -relief sunken -width 60 pack .exmh_post.ng.l -side left -fill both pack .exmh_post.ng.e -side left -fill both -expand 1 *************** *** 169,175 **** # Have we got the essentials ? if {! [expr \ ! "[string length $NNTP(sender)] && [string length $NNTP(subject)] && [string length $NNTP(groups)]"\ ] } { Exmh_Status "Newsgroups , Subject and From fields are NOT optional" return --- 177,183 ---- # Have we got the essentials ? if {! [expr \ ! "[string length $NNTP(sender)] && [string length $NNTP(subject)] && [string length $NNTP(post_groups)]"\ ] } { Exmh_Status "Newsgroups , Subject and From fields are NOT optional" return *************** *** 176,185 **** } set head [list "From: $NNTP(sender)" "Subject: $NNTP(subject)" \ ! "Newsgroups: $NNTP(groups)"] # Is there a moderated group in the list of those we're posting to ? ! set postingTo [split $NNTP(groups) ,] foreach i $NNTP(moderated) { if {[lsearch $postingTo $i]>-1} { lappend head "Approved: $NNTP(moderator)" --- 184,193 ---- } set head [list "From: $NNTP(sender)" "Subject: $NNTP(subject)" \ ! "Newsgroups: $NNTP(post_groups)"] # Is there a moderated group in the list of those we're posting to ? ! set postingTo [split $NNTP(post_groups) ,] foreach i $NNTP(moderated) { if {[lsearch $postingTo $i]>-1} { lappend head "Approved: $NNTP(moderator)" EOF-EOF-EOF Patch lib/sedit.tcl<<'EOF-EOF-EOF' *** exmh-2.0/lib/sedit.tcl Mon Sep 22 16:35:38 1997 --- exmh-2.0.1/lib/sedit.tcl Tue Dec 23 10:45:50 1997 *************** *** 465,478 **** } proc SeditSave { draft t {hook {}} {isigw 1} } { ! global sedit mhProfile if [catch { SeditMsg $t "Saving message..." set out [open $draft w] ! if {([string compare $sedit($t,format) "Never"] != 0) && ! !($sedit($t,mhn))} { SeditFormatMail $t $out $isigw } else { SeditCheckForIsigHeaders $t if {[catch {set end [$t index hlimit]}] && [catch {set end [$t index header]}]} { --- 465,479 ---- } proc SeditSave { draft t {hook {}} {isigw 1} } { ! global sedit mhProfile exmh if [catch { SeditMsg $t "Saving message..." set out [open $draft w] ! if {([string compare $sedit($t,format) "Never"] != 0)} { SeditFormatMail $t $out $isigw } else { + # Prevent duplicate X-Mailer or X-Exmh-Isig-* headers + set id $sedit($t,id) SeditCheckForIsigHeaders $t if {[catch {set end [$t index hlimit]}] && [catch {set end [$t index header]}]} { *************** *** 480,486 **** --- 481,493 ---- } set X1 [$t get 1.0 $end] set X2 [$t get $end end] + regsub -all -nocase "(^|\n)(x-mailer:\[^\n\]*\n)+" $X1 {\1} X1 regsub -all -nocase "(^|\n)(x-exmh-isig-(comptype|folder):\[^\n\]*\n)+" $X1 {\1} X1 + # No X-Mailer on redistributed messages + if {[string compare $exmh($id,action) dist] != 0} { + puts $out "X-Mailer: exmh $exmh(version)" + } + # Replace X-Exmh-Isig-* headers if necessary if {$isigw} { puts $out "X-Exmh-Isig-CompType: $sedit($t,isigc)" puts $out "X-Exmh-Isig-Folder: $sedit($t,isigf)" EOF-EOF-EOF Patch lib/tclIndex<<'EOF-EOF-EOF' *** exmh-2.0/lib/tclIndex Mon Dec 8 09:30:09 1997 --- exmh-2.0.1/lib/tclIndex Tue Dec 23 10:14:44 1997 *************** *** 1177,1182 **** --- 1177,1208 ---- set auto_index(Addr_Edit_Delete) [list source [file join $dir addr.tcl]] set auto_index(Addr_Edit_Abort) [list source [file join $dir addr.tcl]] set auto_index(Addr_Edit_Dismiss) [list source [file join $dir addr.tcl]] + set auto_index(SeditHelp) [list source [file join $dir sedit.tcl]] + set auto_index(SeditId) [list source [file join $dir sedit.tcl]] + set auto_index(SeditProperSigfileDefault) [list source [file join $dir sedit.tcl]] + set auto_index(SeditSigfileDefault) [list source [file join $dir sedit.tcl]] + set auto_index(Sedit_Start) [list source [file join $dir sedit.tcl]] + set auto_index(SeditSetContext) [list source [file join $dir sedit.tcl]] + set auto_index(SeditPositionCursor) [list source [file join $dir sedit.tcl]] + set auto_index(SeditQuit) [list source [file join $dir sedit.tcl]] + set auto_index(SeditAbortDirect) [list source [file join $dir sedit.tcl]] + set auto_index(SeditAbort) [list source [file join $dir sedit.tcl]] + set auto_index(SeditAbortConfirm) [list source [file join $dir sedit.tcl]] + set auto_index(SeditNuke) [list source [file join $dir sedit.tcl]] + set auto_index(SeditMsg) [list source [file join $dir sedit.tcl]] + set auto_index(SeditSend) [list source [file join $dir sedit.tcl]] + set auto_index(SeditSave) [list source [file join $dir sedit.tcl]] + set auto_index(SeditAlternate) [list source [file join $dir sedit.tcl]] + set auto_index(SeditSaveBody) [list source [file join $dir sedit.tcl]] + set auto_index(SeditReplaceBody) [list source [file join $dir sedit.tcl]] + set auto_index(SeditMarkSent) [list source [file join $dir sedit.tcl]] + set auto_index(SeditNotSent) [list source [file join $dir sedit.tcl]] + set auto_index(Sedit_CheckPoint) [list source [file join $dir sedit.tcl]] + set auto_index(SeditPeriodicSave) [list source [file join $dir sedit.tcl]] + set auto_index(SeditFixupMhn) [list source [file join $dir sedit.tcl]] + set auto_index(SeditDragDrop) [list source [file join $dir sedit.tcl]] + set auto_index(SeditSetHeader) [list source [file join $dir sedit.tcl]] + set auto_index(SeditSetHeader) [list source [file join $dir sedit.tcl]] set auto_index(Msg_Setup) [list source [file join $dir msgShow.tcl]] set auto_index(Msg_Redisplay) [list source [file join $dir msgShow.tcl]] set auto_index(MsgShow) [list source [file join $dir msgShow.tcl]] *************** *** 1477,1508 **** set auto_index(Head_Update) [list source [file join $dir html_head.tcl]] set auto_index(HeadAddMeta) [list source [file join $dir html_head.tcl]] set auto_index(HeadAddComment) [list source [file join $dir html_head.tcl]] - set auto_index(SeditHelp) [list source [file join $dir sedit.tcl]] - set auto_index(SeditId) [list source [file join $dir sedit.tcl]] - set auto_index(SeditProperSigfileDefault) [list source [file join $dir sedit.tcl]] - set auto_index(SeditSigfileDefault) [list source [file join $dir sedit.tcl]] - set auto_index(Sedit_Start) [list source [file join $dir sedit.tcl]] - set auto_index(SeditSetContext) [list source [file join $dir sedit.tcl]] - set auto_index(SeditPositionCursor) [list source [file join $dir sedit.tcl]] - set auto_index(SeditQuit) [list source [file join $dir sedit.tcl]] - set auto_index(SeditAbortDirect) [list source [file join $dir sedit.tcl]] - set auto_index(SeditAbort) [list source [file join $dir sedit.tcl]] - set auto_index(SeditAbortConfirm) [list source [file join $dir sedit.tcl]] - set auto_index(SeditNuke) [list source [file join $dir sedit.tcl]] - set auto_index(SeditMsg) [list source [file join $dir sedit.tcl]] - set auto_index(SeditSend) [list source [file join $dir sedit.tcl]] - set auto_index(SeditSave) [list source [file join $dir sedit.tcl]] - set auto_index(SeditAlternate) [list source [file join $dir sedit.tcl]] - set auto_index(SeditSaveBody) [list source [file join $dir sedit.tcl]] - set auto_index(SeditReplaceBody) [list source [file join $dir sedit.tcl]] - set auto_index(SeditMarkSent) [list source [file join $dir sedit.tcl]] - set auto_index(SeditNotSent) [list source [file join $dir sedit.tcl]] - set auto_index(Sedit_CheckPoint) [list source [file join $dir sedit.tcl]] - set auto_index(SeditPeriodicSave) [list source [file join $dir sedit.tcl]] - set auto_index(SeditFixupMhn) [list source [file join $dir sedit.tcl]] - set auto_index(SeditDragDrop) [list source [file join $dir sedit.tcl]] - set auto_index(SeditSetHeader) [list source [file join $dir sedit.tcl]] - set auto_index(SeditSetHeader) [list source [file join $dir sedit.tcl]] set auto_index(FolderAutoFind) [list source [file join $dir autorefile.tcl]] set auto_index(FolderAutoParse) [list source [file join $dir autorefile.tcl]] set auto_index(Folder_AutoRefile) [list source [file join $dir autorefile.tcl]] --- 1503,1508 ---- EOF-EOF-EOF Patch lib/html/exmh.README.html<<'EOF-EOF-EOF' *** exmh-2.0/lib/html/exmh.README.html Mon Dec 22 13:28:11 1997 --- exmh-2.0.1/lib/html/exmh.README.html Tue Dec 23 11:04:18 1997 *************** *** 48,57 ****
Check out the patch
--- 8,16 ----
Exmh 2.0
!
! exmh-2.0.1.tar.Z
! (http)
(ftp)
Check out the patch
EOF-EOF-EOF
Patch lib/html/software.html<<'EOF-EOF-EOF'
*** exmh-2.0/lib/html/software.html Mon Dec 22 13:13:37 1997
--- exmh-2.0.1/lib/html/software.html Tue Dec 23 11:02:06 1997
***************
*** 22,33 ****
indicates that this package is
optional
!
--- 22,33 ----
indicates that this package is
optional
!
EOF-EOF-EOF