]> git.donarmstrong.com Git - debhelper.git/blob - dh_fixperms
r1: Initial revision
[debhelper.git] / dh_fixperms
1 #!/bin/sh -e
2 #
3 # Do some general file permission fixups.
4
5 PATH=debian:$PATH:/usr/lib/debhelper
6 source dh_lib
7
8 # General things..
9 if [ -d debian/tmp ]; then
10         doit "chown -R root.root debian/tmp"
11         doit "chmod -R go=rX debian/tmp"
12 fi
13
14 # Fix up premissions in /usr/doc, setting everything to not exectable
15 # by default.
16 files=`find debian/tmp/usr/doc -type f 2>/dev/null | tr "\n" " "` || true
17 if [ "$files" ]; then
18         doit "chmod 644 $files"
19 fi
20 files=`find debian/tmp/usr/doc -type d 2>/dev/null | tr "\n" " "` || true
21 if [ "$files" ]; then
22         doit "chmod 755 $files"
23 fi
24
25 # Executable man pages is just not done.
26 files=`find debian/tmp/usr/man/ debian/tmp/usr/X11*/man/ -type f 2>/dev/null | tr "\n" " "` || true
27 if [ "$files" ]; then
28         doit "chmod 644 $files"
29 fi