File: apt-file.postinst

package info (click to toggle)
apt-file 2.5.4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 632 kB
  • ctags: 77
  • sloc: perl: 1,309; python: 132; makefile: 100; sh: 87
file content (29 lines) | stat: -rw-r--r-- 737 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

#DEBHELPER#

if [ "$1" != configure ]; then
	exit 0
fi

# fix wrong permissions created by old versions
if     [ -n "$2" ] &&
       dpkg --compare-versions "$2" lt 2.1.5~ &&
       ! dpkg-statoverride --list /var/cache/apt/apt-file > /dev/null 2>&1
then
       chmod 755 /var/cache/apt/apt-file
fi

unud=/var/lib/update-notifier/user.d

if /usr/share/apt-file/is-cache-empty; then
	echo "The system-wide cache is empty. You may want to run 'apt-file update'"
	echo "as root to update the cache. You can also run 'apt-file update' as"
	echo "normal user to use a cache in the user's home directory."
fi

if [ -d $unud ]; then
	cp -f /usr/share/apt-file/apt-file-update.update-notifier \
	    "$unud/apt-file-update"
fi