Package: aolserver4 / 4.5.1-18.1

nsinstall-man.sh.patch Patch series | download
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#! /bin/sh /usr/share/dpatch/dpatch-run
## nsinstall-man.sh.dpatch by Francesco Paolo Lovergine <frankie@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: This patch move manpages from section n in section 3 and normalizes links

@DPATCH@
diff -urNad aolserver4-4.5.0~/util/nsinstall-man.sh aolserver4-4.5.0/util/nsinstall-man.sh
--- aolserver4-4.5.0~/util/nsinstall-man.sh	2007-04-18 19:27:55.000000000 +0200
+++ aolserver4-4.5.0/util/nsinstall-man.sh	2007-04-18 19:29:04.000000000 +0200
@@ -101,6 +101,9 @@
 # Create or link man pages for each name.
 #
 
+if [ "$SECTION" = "n" ]; then
+	SECTION=3
+fi
 if test -z "$HTM"; then
     DIR=$DIR/man$SECTION
     MAN2HTM=$CAT
@@ -118,12 +121,24 @@
     $RM $file
     if test -z "$FIRST"; then
 	FIRST=$file
-	$SED -e "/man\.macros/r $MACROS" -e "/man\.macros/d" $MANPAGE | \
-		$MAN2HTM > $file
-	$CHMOD $MODE $file
-    	$ECHO "created: $file ($MODE)"
+	if test -z "$HTM"; then
+		$SED -e "/man\.macros/r $MACROS" -e "/man\.macros/d" $MANPAGE | \
+			$SED 's/\(\.TH\) \(\w\+\) [n3] \(.*\)/\1 \2 3aolserver \3/' | \
+			$MAN2HTM | gzip -9 > ${file}aolserver.gz
+		$CHMOD $MODE ${file}aolserver.gz
+    		$ECHO "created: ${file}aolserver.gz ($MODE)"
+	else
+		$SED -e "/man\.macros/r $MACROS" -e "/man\.macros/d" $MANPAGE | \
+			$MAN2HTM > $file
+		$CHMOD $MODE $file
+    		$ECHO "created: $file ($MODE)"
+	fi
     else
-	$LN $FIRST $file
+	if test -z "$HTM"; then
+		$LN `basename $FIRST`aolserver.gz ${file}aolserver.gz
+	else
+		$LN `basename $FIRST` $file
+	fi
     	$ECHO "linked: $file"
     fi
 done