summary refs log tree commit diff
path: root/package/install-man
diff options
context:
space:
mode:
authorGerrit Pape <pape@smarden.org>2002-01-01 15:28:32 +0000
committerGerrit Pape <pape@smarden.org>2002-01-01 15:28:32 +0000
commita0d7afa1e8310c2d491b09ea723789d7180c3836 (patch)
treef03d93a9e47938c8986da304c37f599f5d17bc92 /package/install-man
parent44106088217023982574f9ef1b489ca2ff917241 (diff)
downloadrunit-a0d7afa1e8310c2d491b09ea723789d7180c3836.tar.gz
runit-a0d7afa1e8310c2d491b09ea723789d7180c3836.tar.xz
runit-a0d7afa1e8310c2d491b09ea723789d7180c3836.zip
install-man integrated.
Diffstat (limited to 'package/install-man')
-rwxr-xr-xpackage/install-man28
1 files changed, 28 insertions, 0 deletions
diff --git a/package/install-man b/package/install-man
new file mode 100755
index 0000000..2e4f630
--- /dev/null
+++ b/package/install-man
@@ -0,0 +1,28 @@
+#!/bin/sh -e
+
+umask 022
+test -d package || ( echo 'Wrong working directory.'; exit 1 )
+test -d man || ( echo 'Wrong working directory.'; exit 1 )
+
+here=`env - PATH=$PATH pwd`
+parent=`dirname $here`
+
+echo 'Compressing manpages...'
+for i in man/*.[1-8]
+do
+  gzip -c $i > ${i}.gz
+done
+
+echo 'Making manpage links in /usr/local/man...'
+cd man
+for i in 8
+do
+  mkdir -p /usr/local/man/man$i
+  for j in *.$i
+  do
+    rm -f /usr/local/man/man$i/$j.gz'{new}'
+    ln -s $parent/runit/man/$j.gz /usr/local/man/man$i/$j.gz'{new}'
+    mv -f /usr/local/man/man$i/$j.gz'{new}' /usr/local/man/man$i/$j.gz
+  done
+done
+cd ..