| 20 |
|
|
| 21 |
stylesheet_dir="$build_path/stylesheets" |
stylesheet_dir="$build_path/stylesheets" |
| 22 |
stylesheet_profile="$stylesheet_dir/style-profile.xsl" |
stylesheet_profile="$stylesheet_dir/style-profile.xsl" |
| 23 |
stylesheet_html="$stylesheet_dir/style-html.xsl" |
if [ ! "$web_build" ]; then |
| 24 |
|
stylesheet_html="$stylesheet_dir/style-html.xsl" |
| 25 |
|
else |
| 26 |
|
stylesheet_html="$stylesheet_dir/style-html-web.xsl" |
| 27 |
|
fi |
| 28 |
stylesheet_html_single="$stylesheet_dir/style-html-single.xsl" |
stylesheet_html_single="$stylesheet_dir/style-html-single.xsl" |
| 29 |
stylesheet_fo="$stylesheet_dir/style-fo.xsl" |
stylesheet_fo="$stylesheet_dir/style-fo.xsl" |
| 30 |
stylesheet_dsssl="$stylesheet_dir/style-print.dsl" |
stylesheet_dsssl="$stylesheet_dir/style-print.dsl" |
| 32 |
entities_path="$build_path/entities" |
entities_path="$build_path/entities" |
| 33 |
source_path="$manual_path/$language" |
source_path="$manual_path/$language" |
| 34 |
|
|
| 35 |
if [ -z $destination ]; then |
if [ -z "$destdir" ]; then |
| 36 |
destination="build.out" |
destdir="build.out" |
| 37 |
fi |
fi |
| 38 |
|
|
| 39 |
tempdir="build.tmp" |
tempdir="build.tmp" |
| 52 |
fi |
fi |
| 53 |
|
|
| 54 |
# Now we source the profiling information for the selected architecture |
# Now we source the profiling information for the selected architecture |
| 55 |
[ -f arch-options/${arch} ] || { |
[ -f "arch-options/${arch}" ] || { |
| 56 |
echo "Error: unknown architecture $arch!" |
echo "Error: unknown architecture '$arch'" |
| 57 |
return 1 |
return 1 |
| 58 |
} |
} |
| 59 |
. arch-options/$arch |
. arch-options/$arch |
| 67 |
echo "<!ENTITY architecture \"${arch}\">" >> $dynamic |
echo "<!ENTITY architecture \"${arch}\">" >> $dynamic |
| 68 |
echo "<!ENTITY kernelversion \"${kernelversion}\">" >> $dynamic |
echo "<!ENTITY kernelversion \"${kernelversion}\">" >> $dynamic |
| 69 |
echo "<!ENTITY altkernelversion \"${altkernelversion}\">" >> $dynamic |
echo "<!ENTITY altkernelversion \"${altkernelversion}\">" >> $dynamic |
|
|
|
| 70 |
sed "s:##SRCPATH##:$source_path:" templates/docstruct.ent >> $dynamic |
sed "s:##SRCPATH##:$source_path:" templates/docstruct.ent >> $dynamic |
| 71 |
|
|
| 72 |
sed "s:##LANG##:$language:g" templates/install.xml.template | \ |
sed "s:##LANG##:$language:g" templates/install.xml.template | \ |
| 73 |
sed "s:##TEMPDIR##:$tempdir:g" | \ |
sed "s:##TEMPDIR##:$tempdir:g" | \ |
| 74 |
sed "s:##ENTPATH##:$entities_path:g" | \ |
sed "s:##ENTPATH##:$entities_path:g" | \ |
| 75 |
sed "s:##SRCPATH##:$source_path:" > $tempdir/install.${language}.xml |
sed "s:##SRCPATH##:$source_path:" > $tempdir/install.${language}.xml |
| 76 |
|
|
| 77 |
# Create the profiled xml file |
# Create the profiled xml file |
| 78 |
/usr/bin/xsltproc \ |
/usr/bin/xsltproc \ |
| 93 |
|
|
| 94 |
/usr/bin/xsltproc \ |
/usr/bin/xsltproc \ |
| 95 |
--xinclude \ |
--xinclude \ |
| 96 |
--stringparam base.dir $destination/html/ \ |
--stringparam base.dir $destdir/html/ \ |
| 97 |
$stylesheet_html \ |
$stylesheet_html \ |
| 98 |
$tempdir/install.${language}.profiled.xml |
$tempdir/install.${language}.profiled.xml |
| 99 |
RET=$?; [ $RET -ne 0 ] && return $RET |
RET=$?; [ $RET -ne 0 ] && return $RET |
| 128 |
echo "Info: creating .txt file..." |
echo "Info: creating .txt file..." |
| 129 |
|
|
| 130 |
# Set encoding for output file |
# Set encoding for output file |
| 131 |
case $language in |
case "$language" in |
| 132 |
cs) |
cs) |
| 133 |
CHARSET=ISO-8859-2 |
CHARSET=ISO-8859-2 |
| 134 |
;; |
;; |
| 145 |
|
|
| 146 |
/usr/bin/w3m -dump $tempdir/install.${language}.corr.html \ |
/usr/bin/w3m -dump $tempdir/install.${language}.corr.html \ |
| 147 |
-o display_charset=$CHARSET \ |
-o display_charset=$CHARSET \ |
| 148 |
>$destination/install.${language}.txt |
>$destdir/install.${language}.txt |
| 149 |
RET=$?; [ $RET -ne 0 ] && return $RET |
RET=$?; [ $RET -ne 0 ] && return $RET |
| 150 |
|
|
| 151 |
return 0 |
return 0 |
| 157 |
[ -x /usr/bin/jadetex ] || return 9 |
[ -x /usr/bin/jadetex ] || return 9 |
| 158 |
|
|
| 159 |
# Skip this step if the .dvi file already exists |
# Skip this step if the .dvi file already exists |
| 160 |
[ -f $tempdir/install.${language}.dvi ] && return |
[ -f "$tempdir/install.${language}.dvi" ] && return |
| 161 |
|
|
| 162 |
echo "Info: creating temporary .tex file..." |
echo "Info: creating temporary .tex file..." |
| 163 |
|
|
| 169 |
-d $stylesheet_dsssl \ |
-d $stylesheet_dsssl \ |
| 170 |
-V tex-backend \ |
-V tex-backend \ |
| 171 |
$tempdir/install.${language}.profiled.xml |
$tempdir/install.${language}.profiled.xml |
| 172 |
RET=$? |
RET=$?; [ $RET -ne 0 ] && return $RET |
|
if [ $RET -eq 1 ] && [ -s $tempdir/install.${language}.tex ] ; then |
|
|
echo "Warning: recieved error $RET from 'openjade'; probably non-fatal so ignoring." |
|
|
else |
|
|
[ $RET -ne 0 ] && return $RET |
|
|
fi |
|
| 173 |
|
|
| 174 |
echo "Info: creating temporary .dvi file..." |
echo "Info: creating temporary .dvi file..." |
| 175 |
|
|
| 197 |
|
|
| 198 |
/usr/bin/dvipdf $tempdir/install.${language}.dvi |
/usr/bin/dvipdf $tempdir/install.${language}.dvi |
| 199 |
RET=$?; [ $RET -ne 0 ] && return $RET |
RET=$?; [ $RET -ne 0 ] && return $RET |
| 200 |
mv install.${language}.pdf $destination/ |
mv install.${language}.pdf $destdir/ |
| 201 |
|
|
| 202 |
return 0 |
return 0 |
| 203 |
} |
} |
| 213 |
|
|
| 214 |
/usr/bin/dvips -q $tempdir/install.${language}.dvi |
/usr/bin/dvips -q $tempdir/install.${language}.dvi |
| 215 |
RET=$?; [ $RET -ne 0 ] && return $RET |
RET=$?; [ $RET -ne 0 ] && return $RET |
| 216 |
mv install.${language}.ps $destination/ |
mv install.${language}.ps $destdir/ |
| 217 |
|
|
| 218 |
return 0 |
return 0 |
| 219 |
} |
} |
| 222 |
|
|
| 223 |
# Clean old builds |
# Clean old builds |
| 224 |
rm -rf $tempdir |
rm -rf $tempdir |
| 225 |
rm -rf $destination |
rm -rf $destdir |
| 226 |
|
|
| 227 |
[ -d $manual_path/$language ] || { |
[ -d "$manual_path/$language" ] || { |
| 228 |
echo "Error: unknown language $language" |
echo "Error: unknown language '$language'" |
| 229 |
exit 1 |
exit 1 |
| 230 |
} |
} |
| 231 |
|
|
| 232 |
mkdir -p $tempdir |
mkdir -p $tempdir |
| 233 |
mkdir -p $destination |
mkdir -p $destdir |
| 234 |
|
|
| 235 |
# Create profiled XML. This is needed for all output formats. |
# Create profiled XML. This is needed for all output formats. |
| 236 |
create_profiled |
create_profiled |
| 273 |
done |
done |
| 274 |
|
|
| 275 |
# Clean up |
# Clean up |
| 276 |
###rm -r $tempdir |
rm -r $tempdir |
| 277 |
|
|
| 278 |
# Evaluate the overall results |
# Evaluate the overall results |
| 279 |
[ -n "$BUILD_SKIP" ] && echo "Info: The following formats were skipped:$BUILD_SKIP" |
[ -n "$BUILD_SKIP" ] && echo "Info: The following formats were skipped:$BUILD_SKIP" |