summaryrefslogtreecommitdiff
path: root/source/get_bookmark.sh
diff options
context:
space:
mode:
Diffstat (limited to 'source/get_bookmark.sh')
-rwxr-xr-xsource/get_bookmark.sh25
1 files changed, 18 insertions, 7 deletions
diff --git a/source/get_bookmark.sh b/source/get_bookmark.sh
index 8c8849269e..c83da41bc7 100755
--- a/source/get_bookmark.sh
+++ b/source/get_bookmark.sh
@@ -6,39 +6,50 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-outdir=$1
-
-ffile=$outdir'bookmarks.js'
+outdir=$1$2
+mkdir -p $outdir
+sourcedir=`pwd`/
+ffile=$outdir'/bookmarks.js'
rm -f $ffile
ffile2=temp.html
stub2=\'
+xslfile=$outdir/../../get_bookmark.xsl
+
+# bookmarks for modules
for i in CALC CHART WRITER DRAW IMPRESS MATH BASIC
do
stub1='document.getElementById("bookmark'$i'").innerHTML='\'\\
-sfind=`echo 'text/s'$i | tr '[:upper:]' '[:lower:]'`
+sfind=$sourcedir`echo 'text/s'$i | tr '[:upper:]' '[:lower:]'`
param='--stringparam app '$i
+param=$param' --stringparam Language '$2
rm -f $ffile2
-find $sfind -type f -name "*.xhp" -exec xsltproc $param get_bookmark.xsl {} + >> $ffile2
+find $sfind -type f -name "*.xhp" -exec xsltproc $param $xslfile {} + >> $ffile2
echo $stub1 >> $ffile
sort -k3b -t\> -s -o $ffile2 $ffile2
awk 'NF' $ffile2 >> $ffile
echo $stub2 >> $ffile
done
+# Case of SHARED
+
stub1='document.getElementById("bookmarkSHARED").innerHTML='\'\\
rm -f $ffile2
param='--stringparam app SHARED'
-find text/shared -type f -name "*.xhp" -exec xsltproc $param get_bookmark.xsl {} + >> $ffile2
+param=$param' --stringparam Language '$2
+find $sourcedir'text/shared' -type f -name "*.xhp" -exec xsltproc $param $xslfile {} + >> $ffile2
echo $stub1 >> $ffile
sort -k3b -t\> -s -o $ffile2 $ffile2
awk 'NF' $ffile2 >> $ffile
echo $stub2 >> $ffile
+# Case of Explorer (BASE)
+
stub1='document.getElementById("bookmarkBASE").innerHTML='\'\\
rm -f $ffile2
param='--stringparam app BASE'
-find text/shared/explorer/database -type f -name "*.xhp" -exec xsltproc $param get_bookmark.xsl {} + >> $ffile2
+param=$param' --stringparam Language '$2
+find $sourcedir'text/shared/explorer/database' -type f -name "*.xhp" -exec xsltproc $param $xslfile {} + >> $ffile2
echo $stub1 >> $ffile
sort -k3b -t\> -s -o $ffile2 $ffile2
awk 'NF' $ffile2 >> $ffile