#!/bin/sh -e
# prerm script for perforce-swarm
#
# see: dh_installdeb(1)
# Summary of how this script can be called:
# <prerm> 'remove'
# <old-prerm> 'upgrade' <new-version>
# <new-prerm> 'failed-upgrade' <old-version>
# <conflictor's-prerm> 'remove' 'in-favour' <package> <new-version>
# <deconfigured's-prerm> 'deconfigure' \
# 'in-favour' <package-being-installed> <version> \
# 'removing' <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
ME="${0##*/}"
#echo "###########################"
#echo "[$ME] [$*]"
THISPKG="helix-swarm-triggers"
PERFORCE_ROOT="/opt/perforce"
PERFORCE_CFGDIR="$PERFORCE_ROOT/etc"
SWARM_ROOT="$PERFORCE_ROOT/swarm"
SWARM_DATADIR="$SWARM_ROOT/data"
SWARM_SBINDIR="$SWARM_ROOT/sbin"
SWARM_CONFIG="$SWARM_DATADIR/config.php"
SWARM_TRIG_BINDIR="$PERFORCE_ROOT/swarm-triggers/bin"
SWARM_TRIG_SCRIPT="$SWARM_TRIG_BINDIR/swarm-trigger.pl"
SWARM_CONFIG_SRCNAME="swarm-trigger.conf"
SWARM_TRIG_CONFIG="$PERFORCE_CFGDIR/$SWARM_CONFIG_SRCNAME"
do_remove()
{
echo "$THISPKG: Saving Swarm trigger config with .save suffix"
mv "$SWARM_TRIG_CONFIG" "$SWARM_TRIG_CONFIG.save"
}
case "$1" in
remove|deconfigure)
do_remove
;;
upgrade)
# Leave trigger config file in place
;;
failed-upgrade)
;;
*)
echo "$ME called with unknown argument [$1]" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
# |
Change |
User |
Description |
Committed |
|
#1
|
18730 |
Liz Lam |
clean up code and move things around |
|
|