#! /bin/sh
# maint-buggy - maintain the moon-buggy installation
# Generated automatically from maint.in by Makefile.
# Generated automatically from maint.in.in by configure.
# Copyright 1999  Jochen Voss
# $Id: maint.in.in,v 1.6 1999/07/21 10:52:51 voss Rel $

prefix="/usr/local"
exec_prefix="${prefix}"
bindir="${exec_prefix}/bin"
scoredir="/var/games/moon-buggy"
infodir="${prefix}/info"
mandir="${prefix}/man"
man6dir="$mandir/man6"

usage()
{
  cat <<EOF
Usage: maint-buggy [options]

Maintain the moon-buggy installation.

The options are
  --help            show this message
  --uninstall       Remove the moon-buggy installation from the system
  --version         show the moon-buggy version

Please report bugs to <voss@mathematik.uni-kl.de>.
EOF

  exit $1
}

while test $# -gt 0; do
  case "$1" in
  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) optarg= ;;
  esac

  case "$1" in
    --version)
      cat <<EOF
maint-buggy (moon-buggy) 0.5.1
Copyright (C) 1998 Jochen Voss
Moon-Buggy come with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of Moon-Buggy under the terms of the GNU
General Public License.  For more information about these matters, see
the file named COPYING or press \`c' at Moon-Buggy's title screen.
EOF
      exit 0
      ;;
    --help)
      usage 0
      ;;
    --uninstall)
      set -x
#:pre-uninstall
cd ${prefix}/info
if /bin/sh -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
  ii=yes; \
else ii=; fi; \
list='moon-buggy.info'; \
for file in $list; do \
  test -z "i" \
    || install-info --info-dir=${prefix}/info --remove $file; \
done
      rm -f "$bindir/moon-buggy"
      rm -f "$infodir/moon-buggy.info"
      rm -f "$man6dir/moon-buggy.6"
      rm -f "$man6dir/maint-buggy.6"
      rm -f "$scoredir/mbscore"
      rmdir "$scoredir"
      rm -f "$bindir/maint-buggy"
#:post-uninstall
      ;;
    *)
      usage 1
      ;;
  esac
  shift
done
