summaryrefslogtreecommitdiff
path: root/util/rarian-sk-rebuild.in
blob: f79e9b051db48d6615e6e4334ff23f86d8bf3b33 (plain)
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
#!@BASH@

# Another simple wrapper script.  This time for scrollkeeper-rebuilddb
# This one is slightly more complex in that we have to run a command!
# We also need to pull out the paths from the relevant place first.

prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
convert_dir=@CONVERT_DIR@
datarootdir=@datarootdir@
statedir=@localstatedir@/lib/rarian
datadir=@datadir@
output_dir=${datadir}/help
package_version=@PACKAGE_VERSION@
convert_string="REPLACEME"

if [ ! @ENABLE_OMF_READ@ ]
then

if [ -e $statedir/rarian-update-mtimes ]
then
    for x in $(grep -e '^0:@:' $statedir/rarian-update-mtimes)
    do
	if [[ $convert_string != "REPLACEME" ]]
	then
	    convert_string=$convert_string:${x##0:@:}
	else
	    convert_string=${x##0:@:}
	fi
    done
else
    convert_string=$convert_dir
fi

$bindir/rarian-sk-update -v --clean-index -o $convert_string

fi