]> gitweb.fluxo.info Git - wrappers.git/commitdiff
Check for mutt
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 2 Jul 2016 22:18:51 +0000 (19:18 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 2 Jul 2016 22:18:51 +0000 (19:18 -0300)
mail

diff --git a/mail b/mail
index 776f9f4cd35f7c87e4071c0cbfafa5aa5d7e2f83..14b48bd82d0a0ae0bc04d3a46445f8965f8a004a 100755 (executable)
--- a/mail
+++ b/mail
@@ -6,6 +6,16 @@
 # Parameters
 BASENAME="`basename $0`"
 
+# Check for mutt
+if ! which mutt > /dev/null; then
+  if [ -x "/usr/bin/mail" ]; then
+    /usr/bin/mail
+    exit $?
+  else
+    exit 1
+  fi
+fi
+
 # Check configuration
 if [ ! -e "$HOME/.custom/muttrc" ]; then
   mkdir -p $HOME/.custom/mutt