diff options
Diffstat (limited to 'dh_fixperms')
-rwxr-xr-x | dh_fixperms | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/dh_fixperms b/dh_fixperms new file mode 100755 index 00000000..a2fd9442 --- /dev/null +++ b/dh_fixperms @@ -0,0 +1,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 |