File: postinst

package info (click to toggle)
dsh 0.25.10-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,132 kB
  • sloc: sh: 9,667; ansic: 1,102; makefile: 100
file content (29 lines) | stat: -rw-r--r-- 592 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#! /bin/sh

set -e

if [ "$1" = "configure" ] && [ -z "$2" ]; then
	if [ ! -e /etc/dsh/group/all ]
	then
		# manually create the symlink instead of shipping it
		# see https://bugs.debian.org/788585
		ln -s ../machines.list /etc/dsh/group/all
	fi
fi

# see preinst
SYMLINK="/etc/dsh/group/all"
LASTVERSION="0.25.10-1.3~"

if [ "$1" = "configure" ] &&
   [ -n "$2" ] &&
   dpkg --compare-versions -- "$2" le-nl "$LASTVERSION"; then
	if [ -e ${SYMLINK}.dpkg-backup -o -h ${SYMLINK}.dpkg-backup ] &&
	   [ ! -e "$SYMLINK" ]
	then
		mv -f "${SYMLINK}.dpkg-backup" "$SYMLINK"
	fi
fi

#DEBHELPER#