summaryrefslogtreecommitdiff
path: root/dh_fixperms
blob: a2fd9442db641c66720f357010a940f100973ea8 (plain)
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 -e
#
# Do some general file permission fixups.

PATH=debian:$PATH:/usr/lib/debhelper
source dh_lib

# General things..
if [ -d debian/tmp ]; then
	doit "chown -R root.root debian/tmp"
	doit "chmod -R go=rX debian/tmp"
fi

# Fix up premissions in /usr/doc, setting everything to not exectable
# by default.
files=`find debian/tmp/usr/doc -type f 2>/dev/null | tr "\n" " "` || true
if [ "$files" ]; then
	doit "chmod 644 $files"
fi
files=`find debian/tmp/usr/doc -type d 2>/dev/null | tr "\n" " "` || true
if [ "$files" ]; then
	doit "chmod 755 $files"
fi

# Executable man pages is just not done.
files=`find debian/tmp/usr/man/ debian/tmp/usr/X11*/man/ -type f 2>/dev/null | tr "\n" " "` || true
if [ "$files" ]; then
	doit "chmod 644 $files"
fi