X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=usr_bin%2Fgrml-mutt;h=c09a1f901f3837a656473e868ac5a16640548b29;hb=b09d2ef918f4d0c4ff6c0c6afcf69145b76c157e;hp=589573e5f72d38d9bf2846e7b0a5548fdb95d34f;hpb=44813f34920b62ccb68172797ce3ee2ac056457a;p=grml-scripts-core.git diff --git a/usr_bin/grml-mutt b/usr_bin/grml-mutt index 589573e..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 @@ -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!