view packaging/linux-uninstaller.inc @ 1331:8897c90b8166

(issue108) Remove generate_cppcheck and cppcheck target This did not work correctly. It is better just to manually execute cppcheck on the files as it gives you more control over the options.
author Andre Heinecke <andre.heinecke@intevation.de>
date Wed, 15 Oct 2014 13:24:59 +0200
parents d51ae656cfd6
children 77c9e35657ab
line wrap: on
line source
#!/bin/bash
# Copyright (C) 2014 by Bundesamt fΓΌr Sicherheit in der Informationstechnik
# Software engineering by Intevation GmbH
#
# This file is Free Software under the GNU GPL (v>=2)
# and comes with ABSOLUTELY NO WARRANTY!
# See LICENSE.txt for details.

set -u

###INCLUDE:linux-installer-common.inc
###INCLUDE:linux-uninstaller.l10n-de

###INCLUDE:linux-installer-uninstall.inc

DEINSTALL=1

usage()
{
  getxt "Usage: %s [OPTION]...\n" "$ME"
  getxt "Uninstall TrustBridge.\n\n"
  getxt "Options:\n"
  getxt "  -s, --system       do a system wide deinstallation\n"
  getxt "      --help         display this help and exit\n"
  getxt "      --version      output version information and exit\n"
  exit $1
}

parse_args()
{
  OPTS=`getopt \
      -l help,system,version \
      -o s -n "$ME" -- "$@"`
  [ $? -eq 0 ] || usage 23

  eval set -- "$OPTS"

  while true ; do
    case "$1" in
      --system|-s)
        SYSINST=1
        shift 1
        ;;
      --help)
        usage 0
        ;;
      --version)
        version
        ;;
      --)
        shift
        break
        ;;
    esac
  done
}

#======================================================================
# main()

parse_args "$@"
check_priv
init_vars
read_oldinstcfg

cat <<EOF
------------------------------------------------------------------------

   TrustBridge - Uninstaller
   Version ${instcfg[VERSION]} - ${ARCH} (Testversion)

------------------------------------------------------------------------
EOF

deinstall
exit 0

http://wald.intevation.org/projects/trustbridge/