[go: up one dir, main page]

File: preinst

package info (click to toggle)
svgalib 1%3A1.4.3-7
  • links: PTS
  • area: main
  • in suites: woody
  • size: 4,572 kB
  • ctags: 9,256
  • sloc: ansic: 59,532; makefile: 1,337; asm: 630; sh: 162; perl: 54; pascal: 49
file content (25 lines) | stat: -rw-r--r-- 504 bytes parent folder | download | duplicates (4)
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
#! /bin/bash

checklink() {
	if [ -L /etc/$1 ]; then
		echo "Removing obsolete symlink /etc/$1"
		rm -f /etc/$1
	elif [ -f /etc/$1 ]; then
		if [ \! -d /etc/vga ]; then
			install -d -m 755 -o root -g root /etc/vga
		fi
		echo "Moving /etc/$1 to new location /etc/vga/$1"
		mv -f /etc/$1 /etc/vga
	fi
}

# On error, bomb out
set -e

dpkg --assert-working-epoch 2>&- || {
    echo -e "\nYou must upgrade dpkg before installing this package.\n"
    false
}

checklink libvga.config
checklink libvga.et4000