X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=usr_bin%2Fgrml-mutt;h=c09a1f901f3837a656473e868ac5a16640548b29;hb=24c1bd1dc1799b4124782c9f66267d2c4f974bb7;hp=135ad3c4dc84e114d5dc07d255f1dcd28639f52a;hpb=e720deae78f1eda5e6f62629606c194f16796762;p=grml-scripts-core.git diff --git a/usr_bin/grml-mutt b/usr_bin/grml-mutt index 135ad3c..c09a1f9 100755 --- a/usr_bin/grml-mutt +++ b/usr_bin/grml-mutt @@ -4,11 +4,16 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Son Apr 24 16:55:51 CEST 2005 [mika] +# Latest change: Son Mär 18 17:15:41 CET 2007 [mika] ################################################################################ PATH=${PATH:-'/bin/:/sbin/:/usr/local/bin:/usr/bin:/usr/sbin'} -PN=`basename "$0"` +PN=$(basename "$0") + +if [ -r /etc/grml/script-functions ] ; then + . /etc/grml/script-functions + check4progs dialog mutt || echo "Warning - mutt is not available. Continuing anyway.">&2 +fi writemuttrc() { cat > $MUTTRC << EOF @@ -362,7 +367,7 @@ case $retval in esac writecolors() { - if [ "$COLOR" == 'light' ] ; then + if [ "$COLOR" = 'light' ] ; then lightcolors fi } @@ -382,17 +387,15 @@ case $retval in 0) writemuttrc && writecolors && \ dialog --stdout --title "$PN" --msgbox "Writing $MUTTRC was successful." 7 65 || \ - dialog --stdout --title "$PN" --msgbox "Error $?: writing $MUTTRC failed." 7 65 + { dialog --stdout --title "$PN" --msgbox "Error $?: writing $MUTTRC failed." 7 65 ; exit 1 ; } ;; -# *) exit 1 ;; esac else writemuttrc && writecolors && \ dialog --stdout --title "$PN" --msgbox "Writing $MUTTRC was successfull." 7 65 || \ - dialog --stdout --title "$PN" --msgbox "Error $?: writing $MUTTRC failed." 7 65 + { dialog --stdout --title "$PN" --msgbox "Error $?: writing $MUTTRC failed." 7 65 ; exit 1 ; } fi ;; -# *) exit 1 ;; esac dialog --stdout --title "$PN" --msgbox "Thanks for using $PN!