mairix.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/sh
  2. # * Copyright 2007 Tristan Chabredier <wwp@claws-mail.org>
  3. # *
  4. # * This file is free software; you can redistribute it and/or modify it
  5. # * under the terms of the GNU General Public License as published by
  6. # * the Free Software Foundation; either version 3 of the License, or
  7. # * (at your option) any later version.
  8. # *
  9. # * This program is distributed in the hope that it will be useful, but
  10. # * WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. # * General Public License for more details.
  13. # *
  14. # * You should have received a copy of the GNU General Public License
  15. # * along with this program; if not, write to the Free Software
  16. # * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  17. #
  18. # mairix.sh mairix wrapper for Claws Mail
  19. # if any param is passed, $1 must be the mairixrc file to use
  20. # if no param is passed, ~/.mairixrc is assumed
  21. read TEXT
  22. test -z "$TEXT" && \
  23. exit 0
  24. if [ $# -ge 1 ]
  25. then
  26. RCFILE="$1"
  27. shift
  28. else
  29. RCFILE=~/.mairixrc
  30. fi
  31. mairix -f "$RCFILE" --purge && \
  32. mairix -f "$RCFILE" "$@" $TEXT
  33. exit $?