#! /bin/sh # A deprecated interface to GNU Mailutils configuration facilities. # Copyright (C) 2010-2021 Free Software Foundation, Inc. # # GNU Mailutils is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or (at # your option) any later version. # # GNU Mailutils is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Mailutils. If not, see . # Despite being deprecated, this script is retained as an intermediate # layer between mu and the AM_GNU_MAILUTILS macro. This is important, # because some distros prefer to rename mu when installing. Using this # script allows AM_GNU_MAILUTILS to find mu even if it was renamed. mode= file= dir=`expr "$0" : '\(.*\)/.*'` muname=mailutils test -n "$dir" && PATH=$dir:$PATH usage() { cat <&2 "$0: invalid option: $1" exit 1 esac ;; -q|--q|--qu|--que|--quer|--query) mode=query break ;; -q*) mode=query file=`expr "$arg" : '-q\(.*\)'` break ;; --usage|--u|--us|--usa|--usag|--help|--hel|--he|--h) usage ;; -V|--version|--versio|--versi|--vers|--ver|--ve|--v) $muname --version | sed -n '1{s/^mailutils/mailutils-config/;s/(\(GNU Mailutils\)) \([0-9][0-9.]*\).*/(\1 \2)/;p}' exit 0 ;; *) echo >&2 "$0: unexpected argument; try \`$0 --usage' for help" exit 1 ;; esac done if test -z "$mode"; then usage fi if test -n "$file"; then set -- -f"$file" $* fi $muname $mode $*