View | Details | Raw Unified | Return to bug 186879 | Differences between
and this patch

Collapse All | Expand All

(-)rarian/Makefile (-4 / +2 lines)
Lines 12-21 Link Here
12
COMMENT=	OMF help system based on the Freedesktop specification
12
COMMENT=	OMF help system based on the Freedesktop specification
13
13
14
BUILD_DEPENDS=	${LOCALBASE}/share/xsl/docbook/xhtml/chunk.xsl:${PORTSDIR}/textproc/docbook-xsl \
14
BUILD_DEPENDS=	${LOCALBASE}/share/xsl/docbook/xhtml/chunk.xsl:${PORTSDIR}/textproc/docbook-xsl \
15
    		${LOCALBASE}/share/xml/docbook/${DOCBOOK_VERSION}:${PORTSDIR}/textproc/docbook-xml \
15
    		${LOCALBASE}/share/xml/docbook/${DOCBOOK_VERSION}:${PORTSDIR}/textproc/docbook-xml
16
		bash:${PORTSDIR}/shells/bash
16
RUN_DEPENDS=	${LOCALBASE}/bin/getopt:${PORTSDIR}/misc/getopt \
17
RUN_DEPENDS=	bash:${PORTSDIR}/shells/bash \
18
    		${LOCALBASE}/bin/getopt:${PORTSDIR}/misc/getopt \
19
		${LOCALBASE}/share/xsl/docbook/xhtml/chunk.xsl:${PORTSDIR}/textproc/docbook-xsl \
17
		${LOCALBASE}/share/xsl/docbook/xhtml/chunk.xsl:${PORTSDIR}/textproc/docbook-xsl \
20
		${LOCALBASE}/share/xml/docbook/${DOCBOOK_VERSION}:${PORTSDIR}/textproc/docbook-xml
18
		${LOCALBASE}/share/xml/docbook/${DOCBOOK_VERSION}:${PORTSDIR}/textproc/docbook-xml
21
19
(-)rarian/files/patch-util_rarian-sk-config.in (-2 / +17 lines)
Lines 1-5 Link Here
1
--- util/rarian-sk-config.in.orig	2007-10-10 23:00:03.000000000 -0500
1
--- util/rarian-sk-config.in.orig	2008-09-01 14:40:21.000000000 -0400
2
+++ util/rarian-sk-config.in	2007-10-10 23:00:30.000000000 -0500
2
+++ util/rarian-sk-config.in	2013-05-12 10:11:27.075659034 -0400
3
@@ -1,4 +1,4 @@
4
-#!@BASH@
5
+#!/bin/sh
6
 
7
 # Yet another simple wrapper for scrollkeeper wierdness
8
 # This one emulates scrollkeeper-config,
9
@@ -36,7 +36,7 @@
10
 
11
 }
12
 
13
-if [[ $# != 1 ]]
14
+if [ $# != 1 ]
15
 then
16
 	print_help
17
 	exit
3
@@ -47,7 +47,7 @@
18
@@ -47,7 +47,7 @@
4
 		print_help
19
 		print_help
5
 		;;
20
 		;;
(-)rarian/files/patch-util_rarian-sk-extract.in (+29 lines)
Line 0 Link Here
1
--- util/rarian-sk-extract.in.orig	2008-09-01 14:40:21.000000000 -0400
2
+++ util/rarian-sk-extract.in	2013-05-12 10:11:27.075659034 -0400
3
@@ -1,4 +1,4 @@
4
-#!@BASH@
5
+#!/bin/sh
6
 
7
 # Wrapper around xsltproc to mimic scrollkeeper-extract.
8
 #
9
@@ -11,7 +11,7 @@
10
   echo -e "`basename $0` <xml file> <stylesheet 1> <output file 1> <stylesheet 2> <output file 2> ..."
11
 }
12
 
13
-if [[ $# < 2 ]]
14
+if [ $# -lt 2 ]
15
 then
16
   print_usage
17
   exit 0
18
@@ -24,8 +24,8 @@
19
   xsltproc --xinclude --xincludestyle $1 $infile > $2
20
   #echo "xml: $infile style: $1 out: $2"
21
   shift 2
22
-  if [[ $# < 2 ]];
23
+  if [ $# -lt 2 ];
24
   then
25
     break
26
   fi
27
-done
28
\ No newline at end of file
29
+done
(-)rarian/files/patch-util_rarian-sk-rebuild.in (+24 lines)
Line 0 Link Here
1
--- util/rarian-sk-rebuild.in.orig	2008-09-01 14:40:21.000000000 -0400
2
+++ util/rarian-sk-rebuild.in	2013-05-12 10:11:27.075659034 -0400
3
@@ -1,4 +1,4 @@
4
-#!@BASH@
5
+#!/bin/sh
6
 
7
 # Another simple wrapper script.  This time for scrollkeeper-rebuilddb
8
 # This one is slightly more complex in that we have to run a command!
9
@@ -22,7 +22,7 @@
10
 then
11
     for x in $(grep -e '^0:@:' $statedir/rarian-update-mtimes)
12
     do
13
-	if [[ $convert_string != "REPLACEME" ]]
14
+	if [ $convert_string != "REPLACEME" ]
15
 	then
16
 	    convert_string=$convert_string:${x##0:@:}
17
 	else
18
@@ -35,4 +35,4 @@
19
 
20
 $bindir/rarian-sk-update -v --clean-index -o $convert_string
21
 
22
-fi
23
\ No newline at end of file
24
+fi
(-)rarian/files/patch-util_rarian-sk-update.in (+239 lines)
Line 0 Link Here
1
--- util/rarian-sk-update.in.orig	2008-09-01 14:40:21.000000000 -0400
2
+++ util/rarian-sk-update.in	2014-02-18 14:54:52.000000000 -0500
3
@@ -1,4 +1,4 @@
4
-#!@BASH@
5
+#!/bin/sh
6
 
7
 # This script is designed to replace scrollkeeper-update
8
 # It iterates through all the directories specified using -o <dir_list>
9
@@ -25,7 +25,7 @@
10
 datadir=@datadir@
11
 output_dir=${datadir}/help
12
 package_version=@PACKAGE_VERSION@
13
-real_convert[0]=$convert_dir
14
+real_convert=$convert_dir
15
 skip_omf_translate=@ENABLE_OMF_READ@
16
 
17
 # Print the version info for this file
18
@@ -97,7 +97,7 @@
19
 	for f in $1/*.omf; do
20
 	    bname=$(basename $f)
21
 	    bname=${bname%-*.omf}
22
-		if [[ $bname != $old_basename ]]
23
+		if [ $bname != $old_basename ]
24
 		then
25
 			old_basename=$bname
26
 	    	filename=$bname.document
27
@@ -115,39 +115,22 @@
28
 	echo -e `stat -c %Y $1`':@:'$1':@:'$fname_list >> $tmpdir/rarian-updates
29
 }
30
 
31
-# Split up the omf dirs specified on the command line
32
-# I've never seen this used in practice, but
33
-# better safe than sorry
34
-split_omf_dirs ()
35
-{
36
-	let counter=0
37
-	while [ $convert_dir ]
38
-	do
39
-		entry=`echo $convert_dir | cut -d ':' -f 1`
40
-		convert_dir=${convert_dir#$entry}
41
-		convert_dir=${convert_dir#:}
42
-		real_convert[$counter]=$entry
43
-		let counter+=1
44
-	done
45
-
46
-}
47
-
48
 # Determine whether the directory defined within the index file
49
 # was specified in the convert_dirs
50
 am_adding_dir ()
51
 {
52
-	let counter=0
53
 	am_processing="0"
54
-	for i in ${real_convert[@]}
55
+	tmplist=
56
+	for i in ${real_convert}
57
 	do
58
-		if [[ $fname == $i ]]
59
+		if [ $fname == $i ]
60
 		then
61
-			real_convert[$counter]="0"
62
 			am_processing="1"
63
-			return
64
-		fi
65
-		let counter+=1
66
+		else
67
+			tmplist="$tmplist $i"
68
+		fi	
69
 	done
70
+	real_convert=$tmplist
71
 }
72
 
73
 # The directory wasn't specified.  This does nothing except cat the
74
@@ -156,7 +139,7 @@
75
 {
76
 	read line
77
 	time=`echo $line | awk -F ":@:" '{print $1}'`
78
-	while [[ $time -ne 0 ]]
79
+	while [ $time -ne 0 ]
80
 	do
81
 		echo $line
82
 		echo $line >> $tmpdir/rarian-updates
83
@@ -183,18 +166,18 @@
84
 # If the given directory actually exists within the omf dir
85
 dirs_contains ()
86
 {
87
-	let counter=0
88
 	am_processing="0"
89
-	for i in ${entries[@]}
90
+	tmplist=
91
+	for i in ${entries}
92
 	do
93
-		if [[ $1 == $i ]]
94
+		if [ $1 == $i ]
95
 		then
96
-			entries[$counter]="0"
97
 			am_processing="1"
98
-			return
99
+		else
100
+			tmplist="$tmplist $i"
101
 		fi
102
-		let counter+=1
103
 	done
104
+	entries=$tmplist
105
 }
106
 
107
 # The meat.  Goes through and checks each directory mtime against the
108
@@ -202,27 +185,26 @@
109
 # If the dir has been removed, delete.
110
 process_directory ()
111
 {
112
-	let counter=0
113
+	entries=
114
 	for i in  $(ls $fname)
115
 	do
116
-		entries[$counter]="$fname/$i"
117
-		let counter+=1
118
+		entries="$entries $fname/$i"
119
 	done
120
 
121
 	read line
122
 
123
 	old_time=`echo $line | awk -F ":@:" '{print $1}'`
124
 
125
-	while [[ $old_time && $old_time != "0" ]]
126
+	while [ $old_time && $old_time != "0" ]
127
 	do
128
 		name=`echo $line | awk -F ":@:" '{print $2}'`
129
 
130
 		dirs_contains $name
131
 
132
-		if [[ $am_processing != "0" ]]
133
+		if [ $am_processing != "0" ]
134
 		then
135
 			new_time=`stat -c %Y $name`
136
-			if [[ $new_time -ne $old_time ]]
137
+			if [ $new_time -ne $old_time ]
138
 			then
139
 				print_verbose "Directory $name has changed.  Updating."
140
 				process_dir $name
141
@@ -231,7 +213,7 @@
142
 			fi
143
 		else
144
 			filenames=`echo $line | awk -F ":@:" '{print $3}'`
145
-			while [[ $filenames ]]
146
+			while [ $filenames ]
147
 			do
148
 				entry=`echo $filenames | cut -d ';' -f 1`
149
 				print_verbose "Directory resonsible for $entry has been removed.  Deleting"
150
@@ -246,13 +228,10 @@
151
 		old_time=`echo $line | awk -F ":@:" '{print $1}'`
152
 	done
153
 
154
-	for i in ${entries[@]}
155
+	for i in ${entries}
156
 	do
157
-		if [[ $i != "0" ]]
158
-		then
159
-			print_verbose "Directory $i is new and will be added."
160
-			process_dir $i
161
-		fi
162
+		print_verbose "Directory $i is new and will be added."
163
+		process_dir $i
164
 	done
165
 }
166
 
167
@@ -326,7 +305,10 @@
168
 if [ $skip_omf_translate = 0 ]
169
 then
170
 
171
-split_omf_dirs
172
+# Split up the omf dirs specified on the command line
173
+# I've never seen this used in practice, but
174
+# better safe than sorry
175
+real_convert=$(echo $convert_dir | sed 's/:/ /g')
176
 
177
 if [ $update_output_dir ] && [ ! $overload_update ]
178
 then
179
@@ -334,7 +316,7 @@
180
     # omf files in <prefix>/share/omf
181
     # Also assumes only a single omf path
182
     print_verbose "Using non-installed location"
183
-    output_dir=`dirname $real_convert[0]`/help
184
+    output_dir=$(dirname $(echo $real_convert | cut -d ' ' -f 1))/help
185
 fi
186
 
187
 print_verbose "Outputting to $output_dir"
188
@@ -378,16 +360,16 @@
189
 fname=`echo $line | awk -F ":@:" '{print $2}'`
190
 
191
 
192
-while [[ $fname != "" ]]
193
+while [ $fname != "" ]
194
 do
195
 	print_verbose "Processing directory $fname"
196
 	echo "0:@:$fname" >> $tmpdir/rarian-updates
197
 	am_adding_dir $fname
198
-	if [[ ! $(ls $fname 2>&1) ]]
199
+	if [ ! $(ls $fname 2>&1) ]
200
 	then
201
 	    print_verbose "Previous directory $fname no longer exists"
202
 	else
203
-	    if [[ $am_processing != "0" ]]
204
+	    if [ $am_processing != "0" ]
205
 	    then
206
 		process_directory
207
 	    else
208
@@ -397,22 +379,18 @@
209
 	fi
210
 done
211
 
212
-for i in ${real_convert[@]}
213
+for i in ${real_convert}
214
 do
215
-    if [[ $i != "0" ]]
216
-    then
217
 	res=$(ls $i 2>/dev/null)
218
-	if [[ ! $res ]]
219
+	if [ ! $res ]
220
 	then
221
 	    print_verbose "Path $i does not exist.  Ignoring"
222
 	else
223
-	    
224
 	    print_verbose "Adding contents of directory $i"
225
 	    fname=$i
226
 	    echo "0:@:$fname" >> $tmpdir/rarian-updates
227
 	    add_all_files
228
 	fi
229
-    fi
230
 done
231
 
232
 rm -f $statedir/rarian-update-mtimes
233
@@ -422,4 +400,4 @@
234
 fi
235
 rm -rf $tmpdir
236
 
237
-fi # ENABLE_OMF_READ
238
\ No newline at end of file
239
+fi # ENABLE_OMF_READ
(-)rarian/patch-util_rarian-sk-config.in (+26 lines)
Line 0 Link Here
1
--- util/rarian-sk-config.in.orig	2008-09-01 14:40:21.000000000 -0400
2
+++ util/rarian-sk-config.in	2013-05-12 10:11:27.075659034 -0400
3
@@ -1,4 +1,4 @@
4
-#!@BASH@
5
+#!/bin/sh
6
 
7
 # Yet another simple wrapper for scrollkeeper wierdness
8
 # This one emulates scrollkeeper-config,
9
@@ -36,7 +36,7 @@
10
 
11
 }
12
 
13
-if [[ $# != 1 ]]
14
+if [ $# != 1 ]
15
 then
16
 	print_help
17
 	exit
18
@@ -47,7 +47,7 @@
19
 		print_help
20
 		;;
21
 	--version )
22
-		echo $package_version \(Rarian replacement for scrollkeeper-config\)
23
+		echo $package_version
24
 		;;
25
 	--prefix )
26
 		echo $prefix

Return to bug 186879