summaryrefslogtreecommitdiff
path: root/dh_fixperms
diff options
context:
space:
mode:
authorjoey <joey>1999-08-17 04:12:54 +0000
committerjoey <joey>1999-08-17 04:12:54 +0000
commit938b66ee19e113785e6655b1c3e73e9003e6464c (patch)
treed06bd22faa3da8940bec71ba2e34e2028b6e7764 /dh_fixperms
r1: Initial revision
Diffstat (limited to 'dh_fixperms')
-rwxr-xr-xdh_fixperms29
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