source: BLFS/xsl/scripts.xsl@ 7e51281

ablfs
Last change on this file since 7e51281 was 63fc514, checked in by Pierre Labastie <pierre@…>, 13 years ago

Initial modificaiton of BLFS tools

  • Property mode set to 100644
File size: 17.1 KB
RevLine 
[3c10176]1<?xml version="1.0"?>
2
3<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:exsl="http://exslt.org/common"
5 extension-element-prefixes="exsl"
6 version="1.0">
7
[63fc514]8<!-- $Id: scripts.xsl 34 2012-02-21 16:05:09Z labastie $ -->
[3c10176]9
10<!-- XSLT stylesheet to create shell scripts from "linear build" BLFS books. -->
11
[c0bc66d]12 <!-- Build as user (y) or as root (n)? -->
13 <xsl:param name="sudo" select="y"/>
14
[3c10176]15 <xsl:template match="/">
16 <xsl:apply-templates select="//sect1"/>
17 </xsl:template>
18
19<!--=================== Master chunks code ======================-->
20
21 <xsl:template match="sect1">
22
[63fc514]23 <xsl:if test="@id != 'bootscripts'">
[3c10176]24 <!-- The file names -->
[f4ed135]25 <xsl:variable name="filename" select="@id"/>
[3c10176]26
27 <!-- The build order -->
28 <xsl:variable name="position" select="position()"/>
29 <xsl:variable name="order">
30 <xsl:choose>
31 <xsl:when test="string-length($position) = 1">
32 <xsl:text>00</xsl:text>
33 <xsl:value-of select="$position"/>
34 </xsl:when>
35 <xsl:when test="string-length($position) = 2">
36 <xsl:text>0</xsl:text>
37 <xsl:value-of select="$position"/>
38 </xsl:when>
39 <xsl:otherwise>
40 <xsl:value-of select="$position"/>
41 </xsl:otherwise>
42 </xsl:choose>
43 </xsl:variable>
44
45 <!-- Depuration code -->
46 <xsl:message>
47 <xsl:text>SCRIPT is </xsl:text>
[63fc514]48 <xsl:value-of select="concat($order,'-z-',$filename)"/>
[3c10176]49 <xsl:text>&#xA; FTPDIR is </xsl:text>
[63fc514]50 <xsl:value-of select="$filename"/>
[3c10176]51 <xsl:text>&#xA;&#xA;</xsl:text>
52 </xsl:message>
53
54 <!-- Creating the scripts -->
[73c3c1c]55 <exsl:document href="{$order}-z-{$filename}" method="text">
[91ff6a9]56 <xsl:text>#!/bin/bash&#xA;set -e&#xA;&#xA;</xsl:text>
[3c10176]57 <xsl:choose>
58 <!-- Package page -->
[b45f723]59 <xsl:when test="sect2[@role='package'] and not(@id = 'xorg7-app' or
60 @id = 'xorg7-data' or @id = 'xorg7-driver' or
61 @id = 'xorg7-font' or @id = 'xorg7-lib' or
62 @id = 'xorg7-proto' or @id = 'xorg7-util')">
[3c10176]63 <!-- Variables -->
[63fc514]64 <!-- These three lines could be important if SRC_ARCHIVE,
65 FTP_SERVER and SRCDIR were not set in the environment.
66 But they are not tested for length or anything later,
67 so not needed
[3c10176]68 <xsl:text>SRC_ARCHIVE=$SRC_ARCHIVE&#xA;</xsl:text>
[63fc514]69 <xsl:text>FTP_SERVER=$FTP_SERVER&#xA;</xsl:text>
70 <xsl:text>SRC_DIR=$SRC_DIR&#xA;&#xA;</xsl:text>-->
[3c10176]71 <xsl:text>&#xA;PKG_DIR=</xsl:text>
[63fc514]72 <xsl:value-of select="$filename"/>
73 <xsl:text>&#xA;</xsl:text>
[3c10176]74 <!-- Download code and build commands -->
[63fc514]75 <xsl:apply-templates select="sect2"/>
[3c10176]76 <!-- Clean-up -->
[63fc514]77 <!-- xorg7-server used to require mesalib tree being present.
78 That is no more true
79 <xsl:if test="not(@id='mesalib')"> -->
[5fb652f]80 <xsl:text>cd $SRC_DIR/$PKG_DIR&#xA;</xsl:text>
81 <xsl:text>rm -rf $UNPACKDIR unpacked&#xA;&#xA;</xsl:text>
[63fc514]82 <!-- Same reason as preceding comment
[5fb652f]83 </xsl:if>
84 <xsl:if test="@id='xorg7-server'">
85 <xsl:text>cd $SRC_DIR/MesaLib
86UNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
87rm -rf $UNPACKDIR unpacked&#xA;&#xA;</xsl:text>
[63fc514]88 </xsl:if> -->
[3c10176]89 </xsl:when>
[b45f723]90 <!-- Xorg7 pseudo-packages -->
91 <xsl:when test="contains(@id,'xorg7') and not(@id = 'xorg7-server')">
[63fc514]92 <xsl:text># Useless SRC_DIR=$SRC_DIR
[b45f723]93
94cd $SRC_DIR
95mkdir -p xc
96cd xc&#xA;</xsl:text>
97 <xsl:apply-templates select="sect2" mode="xorg7"/>
98 </xsl:when>
[3c10176]99 <!-- Non-package page -->
100 <xsl:otherwise>
101 <xsl:apply-templates select=".//screen"/>
102 </xsl:otherwise>
103 </xsl:choose>
104 <xsl:text>exit</xsl:text>
105 </exsl:document>
106 </xsl:if>
107 </xsl:template>
108
109<!--======================= Sub-sections code =======================-->
110
111 <xsl:template match="sect2">
112 <xsl:choose>
113 <xsl:when test="@role = 'package'">
[f65d3cb]114 <xsl:text>mkdir -p $SRC_DIR/$PKG_DIR&#xA;</xsl:text>
115 <xsl:text>cd $SRC_DIR/$PKG_DIR&#xA;</xsl:text>
[63fc514]116 <xsl:apply-templates select="bridgehead[@renderas='sect3']"/>
[3c10176]117 <xsl:text>&#xA;</xsl:text>
118 </xsl:when>
119 <xsl:when test="@role = 'installation'">
[859d863]120 <xsl:text>
121if [[ -e unpacked ]] ; then
122 UNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
[efef736]123 [[ -n $UNPACKDIR ]] &amp;&amp; [[ -d $UNPACKDIR ]] &amp;&amp; rm -rf $UNPACKDIR
[859d863]124fi
125tar -xvf $PACKAGE > unpacked
126UNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
[6ff1be4]127cd $UNPACKDIR&#xA;</xsl:text>
[3c10176]128 <xsl:apply-templates select=".//screen | .//para/command"/>
[a1d0d5c]129 <xsl:if test="$sudo = 'y'">
[52b0d10]130 <xsl:text>sudo /sbin/</xsl:text>
[a1d0d5c]131 </xsl:if>
132 <xsl:text>ldconfig&#xA;&#xA;</xsl:text>
[3c10176]133 </xsl:when>
134 <xsl:when test="@role = 'configuration'">
[63fc514]135 <xsl:apply-templates select=".//screen" mode="config"/>
[3c10176]136 </xsl:when>
137 </xsl:choose>
138 </xsl:template>
139
[b45f723]140 <xsl:template match="sect2" mode="xorg7">
141 <xsl:choose>
[0efb837]142 <xsl:when test="@role = 'package'">
143 <xsl:apply-templates select="itemizedlist/listitem/para" mode="xorg7"/>
144 </xsl:when>
[b45f723]145 <xsl:when test="not(@role)">
[63fc514]146<!-- Useless <xsl:text>SRC_ARCHIVE=$SRC_ARCHIVE
147FTP_SERVER=$FTP_SERVER&#xA;</xsl:text> -->
[0efb837]148 <xsl:apply-templates select=".//screen" mode="sect-ver"/>
[a70c289]149 <xsl:text>mkdir -p ${section}&#xA;cd ${section}&#xA;</xsl:text>
150 <xsl:apply-templates select="../sect2[@role='package']/itemizedlist/listitem/para" mode="xorg7-patch"/>
[9d9a810]151 <xsl:text>for line in $(grep -v '^#' ../${sect_ver}.wget) ; do
[1caf1f4]152 if [[ ! -f ${line} ]] ; then
153 if [[ -f $SRC_ARCHIVE/Xorg/${section}/${line} ]] ; then
154 cp $SRC_ARCHIVE/Xorg/${section}/${line} ${line}
155 elif [[ -f $SRC_ARCHIVE/Xorg/${line} ]] ; then
156 cp $SRC_ARCHIVE/Xorg/${line} ${line}
157 elif [[ -f $SRC_ARCHIVE/${section}/${line} ]] ; then
158 cp $SRC_ARCHIVE/${section}/${line} ${line}
159 elif [[ -f $SRC_ARCHIVE/${line} ]] ; then
160 cp $SRC_ARCHIVE/${line} ${line}
[a70c289]161 else
[63fc514]162 wget -T 30 -t 5 ${FTP_X_SERVER}pub/individual/${section}/${line} || \
163 wget -T 30 -t 5 http://xorg.freedesktop.org/releases/individual/${section}/${line}
[a70c289]164 fi
165 fi
166done
[9d9a810]167md5sum -c ../${sect_ver}.md5
168cp ../${sect_ver}.wget ../${sect_ver}.wget.orig
169cp ../${sect_ver}.md5 ../${sect_ver}.md5.orig&#xA;</xsl:text>
[b45f723]170 </xsl:when>
171 <xsl:when test="@role = 'installation'">
[9d9a810]172 <xsl:text>for package in $(grep -v '^#' ../${sect_ver}.wget) ; do
[b45f723]173 packagedir=$(echo $package | sed 's/.tar.bz2//')
[1caf1f4]174 tar -xf ${package}
175 cd ${packagedir}&#xA;</xsl:text>
[b45f723]176 <xsl:apply-templates select=".//screen | .//para/command"/>
[5be3651]177 <xsl:text> cd ..
[1caf1f4]178 rm -rf ${packagedir}
[9d9a810]179 sed -i "/${package}/d" ../${sect_ver}.wget
180 sed -i "/${package}/d" ../${sect_ver}.md5
[a70c289]181done
[9d9a810]182mv ../${sect_ver}.wget.orig ../${sect_ver}.wget
183mv ../${sect_ver}.md5.orig ../${sect_ver}.md5&#xA;</xsl:text>
[b45f723]184 <xsl:if test="$sudo = 'y'">
[52b0d10]185 <xsl:text>sudo /sbin/</xsl:text>
[b45f723]186 </xsl:if>
187 <xsl:text>ldconfig&#xA;&#xA;</xsl:text>
188 </xsl:when>
[0efb837]189 <xsl:when test="@role = 'configuration'">
190 <xsl:apply-templates select=".//screen"/>
191 <xsl:text>&#xA;</xsl:text>
192 </xsl:when>
[b45f723]193 </xsl:choose>
194 </xsl:template>
195
[3c10176]196<!--==================== Download code =======================-->
197
198 <xsl:template name="package_name">
199 <xsl:param name="url" select="foo"/>
200 <xsl:param name="sub-url" select="substring-after($url,'/')"/>
201 <xsl:choose>
202 <xsl:when test="contains($sub-url,'/')">
203 <xsl:call-template name="package_name">
204 <xsl:with-param name="url" select="$sub-url"/>
205 </xsl:call-template>
206 </xsl:when>
207 <xsl:otherwise>
208 <xsl:choose>
209 <xsl:when test="contains($sub-url,'?')">
210 <xsl:value-of select="substring-before($sub-url,'?')"/>
211 </xsl:when>
[63fc514]212<!-- Should never happen
213 <xsl:when test="contains($sub-url,'.patch')"/> -->
[3c10176]214 <xsl:otherwise>
215 <xsl:value-of select="$sub-url"/>
216 </xsl:otherwise>
217 </xsl:choose>
218 </xsl:otherwise>
219 </xsl:choose>
220 </xsl:template>
221
[63fc514]222 <xsl:template match="bridgehead">
[3c10176]223 <xsl:choose>
[63fc514]224 <xsl:when test="string()='Package Information'">
225 <xsl:variable name="url">
226 <xsl:choose>
227 <xsl:when
228 test="string-length(
229 following-sibling::itemizedlist[1]/listitem[1]/para/ulink/@url)
230 &gt; 10">
231 <xsl:value-of select=
232 "following-sibling::itemizedlist[1]/listitem[1]/para/ulink/@url"/>
233 </xsl:when>
234 <xsl:otherwise>
235 <xsl:value-of select=
236 "following-sibling::itemizedlist[1]/listitem[2]/para/ulink/@url"/>
237 </xsl:otherwise>
238 </xsl:choose>
[3c10176]239 </xsl:variable>
[63fc514]240 <xsl:variable name="package">
241 <xsl:call-template name="package_name">
242 <xsl:with-param name="url" select="$url"/>
243 </xsl:call-template>
244 </xsl:variable>
245 <xsl:variable
246 name="first_letter"
247 select="translate(substring($package,1,1),
248 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
249 'abcdefghijklmnopqrstuvwxyz')"/>
250 <xsl:text>PACKAGE=</xsl:text>
251 <xsl:value-of select="$package"/>
252 <xsl:text>&#xA;if [[ ! -f $PACKAGE ]] ; then&#xA;</xsl:text>
[3c10176]253 <!-- SRC_ARCHIVE may have subdirectories or not -->
254 <xsl:text> if [[ -f $SRC_ARCHIVE/$PKG_DIR/$PACKAGE ]] ; then&#xA;</xsl:text>
255 <xsl:text> cp $SRC_ARCHIVE/$PKG_DIR/$PACKAGE $PACKAGE&#xA;</xsl:text>
256 <xsl:text> elif [[ -f $SRC_ARCHIVE/$PACKAGE ]] ; then&#xA;</xsl:text>
257 <xsl:text> cp $SRC_ARCHIVE/$PACKAGE $PACKAGE&#xA; else&#xA;</xsl:text>
258 <!-- The FTP_SERVER mirror -->
[63fc514]259 <xsl:text> wget -T 30 -t 5 ${FTP_SERVER}svn/</xsl:text>
260 <xsl:value-of select="$first_letter"/>
261 <xsl:text>/$PACKAGE</xsl:text>
262 <xsl:apply-templates
263 select="following-sibling::itemizedlist[1]/listitem/para"
264 mode="package"/>
265 </xsl:when>
266 <xsl:when test="string()='Additional Downloads'">
267 <xsl:apply-templates
268 select="following-sibling::itemizedlist[1]/listitem/para"
269 mode="additional"/>
270 </xsl:when>
271 <xsl:otherwise/>
272 </xsl:choose>
273 </xsl:template>
274
275 <xsl:template match="para" mode="package">
276 <xsl:choose>
277 <xsl:when test="contains(string(),'HTTP')">
[3c10176]278 <!-- Upstream HTTP URL -->
[f221c2c]279 <xsl:if test="string-length(ulink/@url) &gt; '10'">
[63fc514]280 <xsl:text> || \&#xA; wget -T 30 -t 5 </xsl:text>
[f221c2c]281 <xsl:choose>
282 <xsl:when test="contains(ulink/@url,'?')">
283 <xsl:value-of select="substring-before(ulink/@url,'?')"/>
284 </xsl:when>
285 <xsl:otherwise>
286 <xsl:value-of select="ulink/@url"/>
287 </xsl:otherwise>
288 </xsl:choose>
[63fc514]289 <xsl:if test="not(contains(string(parent::listitem/following-sibling::listitem[1]/para),'FTP'))">
290 <xsl:text>&#xA; fi&#xA;fi&#xA;</xsl:text>
291 </xsl:if>
[3c10176]292 </xsl:if>
293 </xsl:when>
294 <xsl:when test="contains(string(),'FTP')">
295 <!-- Upstream FTP URL -->
296 <xsl:if test="string-length(ulink/@url) &gt; '10'">
[63fc514]297 <xsl:text> || \&#xA; wget -T 30 -t 5 </xsl:text>
[3c10176]298 <xsl:value-of select="ulink/@url"/>
299 </xsl:if>
300 <xsl:text>&#xA; fi&#xA;fi&#xA;</xsl:text>
301 </xsl:when>
302 <xsl:when test="contains(string(),'MD5')">
303 <xsl:text>echo "</xsl:text>
304 <xsl:value-of select="substring-after(string(),'sum: ')"/>
305 <xsl:text>&#x20;&#x20;$PACKAGE" | md5sum -c -&#xA;</xsl:text>
306 </xsl:when>
[63fc514]307 </xsl:choose>
308 </xsl:template>
309
310 <xsl:template match="para" mode="additional">
311 <xsl:choose>
[3c10176]312 <xsl:when test="contains(string(ulink/@url),'.patch')">
[63fc514]313 <xsl:text>wget -T 30 -t 5 </xsl:text>
[3c10176]314 <xsl:value-of select="ulink/@url"/>
315 <xsl:text>&#xA;</xsl:text>
316 </xsl:when>
[63fc514]317 <xsl:when test="ulink">
318 <xsl:if test="string-length(ulink/@url) &gt; '10'">
319 <xsl:variable name="package">
320 <xsl:call-template name="package_name">
321 <xsl:with-param name="url" select="ulink/@url"/>
322 </xsl:call-template>
323 </xsl:variable>
324 <xsl:variable
325 name="first_letter"
326 select="translate(substring($package,1,1),
327 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
328 'abcdefghijklmnopqrstuvwxyz')"/>
329 <xsl:text>PACKAGE1=</xsl:text>
330 <xsl:value-of select="$package"/>
331 <xsl:text>&#xA;if [[ ! -f $PACKAGE1 ]] ; then&#xA;</xsl:text>
332 <!-- SRC_ARCHIVE may have subdirectories or not -->
333 <xsl:text> if [[ -f $SRC_ARCHIVE/$PKG_DIR/$PACKAGE1 ]] ; then&#xA;</xsl:text>
334 <xsl:text> cp $SRC_ARCHIVE/$PKG_DIR/$PACKAGE1 $PACKAGE1&#xA;</xsl:text>
335 <xsl:text> elif [[ -f $SRC_ARCHIVE/$PACKAGE1 ]] ; then&#xA;</xsl:text>
336 <xsl:text> cp $SRC_ARCHIVE/$PACKAGE1 $PACKAGE1&#xA; else&#xA;</xsl:text>
337 <!-- The FTP_SERVER mirror -->
338 <xsl:text> wget -T 30 -t 5 ${FTP_SERVER}blfs/svn/</xsl:text>
339 <xsl:value-of select="$first_letter"/>
340 <xsl:text>/$PACKAGE1</xsl:text>
341 <xsl:text> || \&#xA; wget -T 30 -t 5 </xsl:text>
342 <xsl:value-of select="ulink/@url"/>
343 <xsl:text>&#xA; fi&#xA;fi&#xA;</xsl:text>
344 </xsl:if>
345 </xsl:when>
346 <xsl:when test="contains(string(),'MD5')">
347 <xsl:text>echo "</xsl:text>
348 <xsl:value-of select="substring-after(string(),'sum: ')"/>
349 <xsl:text>&#x20;&#x20;$PACKAGE1" | md5sum -c -&#xA;</xsl:text>
350 </xsl:when>
[3c10176]351 </xsl:choose>
352 </xsl:template>
353
[5be3651]354 <xsl:template match="itemizedlist/listitem/para" mode="xorg7">
[0efb837]355 <xsl:if test="contains(string(ulink/@url),'.md5') or
356 contains(string(ulink/@url),'.wget')">
[63fc514]357 <xsl:text>wget -T 30 -t 5 </xsl:text>
[0efb837]358 <xsl:value-of select="ulink/@url"/>
359 <xsl:text>&#xA;</xsl:text>
360 </xsl:if>
361 </xsl:template>
362
363 <xsl:template match="itemizedlist/listitem/para" mode="xorg7-patch">
[5be3651]364 <xsl:if test="contains(string(ulink/@url),'.patch')">
[63fc514]365 <xsl:text>wget -T 30 -t 5 </xsl:text>
[5be3651]366 <xsl:value-of select="ulink/@url"/>
367 <xsl:text>&#xA;</xsl:text>
368 </xsl:if>
369 </xsl:template>
370
[3c10176]371<!--======================== Commands code ==========================-->
372
373 <xsl:template match="screen">
374 <xsl:if test="child::* = userinput and not(@role = 'nodump')">
[c0bc66d]375 <xsl:if test="@role = 'root' and $sudo = 'y'">
[7c6c355]376 <xsl:text>sudo sh -c '</xsl:text>
[3c10176]377 </xsl:if>
378 <xsl:apply-templates select="userinput"/>
[c0bc66d]379 <xsl:if test="@role = 'root' and $sudo = 'y'">
[7c6c355]380 <xsl:text>'</xsl:text>
[3c10176]381 </xsl:if>
382 <xsl:text>&#xA;</xsl:text>
383 </xsl:if>
384 </xsl:template>
385
[63fc514]386 <xsl:template match="screen" mode="config">
387 <xsl:if test="preceding-sibling::para[1]/xref[@linkend='bootscripts']">
388 <xsl:text>[[ ! -d $SRC_DIR/blfs-bootscripts ]] &amp;&amp; mkdir $SRC_DIR/blfs-bootscripts
389pushd $SRC_DIR/blfs-bootscripts
390URL=</xsl:text>
391 <xsl:value-of select="id('bootscripts')//itemizedlist//ulink/@url"/><xsl:text>
392BOOTPACKG=$(basename $URL)
393[[ ! -f "$BOOTPACKG" ]] &amp;&amp; { wget -T 30 -t 5 $URL; rm -f unpacked; }
394if [[ -e unpacked ]] ; then
395 UNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
396 if ! [[ -d $UNPACKDIR ]]; then
397 rm unpacked
398 tar -xvf $BOOTPACKG > unpacked
399 UNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
400 fi
401else
402 tar -xvf $BOOTPACKG > unpacked
403 UNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
404fi
405cd $UNPACKDIR
406</xsl:text>
407 </xsl:if>
408 <xsl:apply-templates select='.'/>
409 <xsl:if test="preceding-sibling::para[1]/xref[@linkend='bootscripts']">
410 <xsl:text>
411popd</xsl:text>
412 </xsl:if>
413 <xsl:text>&#xA;</xsl:text>
414 </xsl:template>
415
[0efb837]416 <xsl:template match="screen" mode="sect-ver">
[a70c289]417 <xsl:text>section=</xsl:text>
418 <xsl:value-of select="substring-before(substring-after(string(),'mkdir '),' &amp;')"/>
[9d9a810]419 <xsl:text>&#xA;sect_ver=</xsl:text>
[0efb837]420 <xsl:value-of select="substring-before(substring-after(string(),'-c ../'),'.md5')"/>
421 <xsl:text>&#xA;</xsl:text>
[b45f723]422 </xsl:template>
423
[3c10176]424 <xsl:template match="para/command">
425 <xsl:if test="(contains(string(),'test') or
426 contains(string(),'check'))">
427 <xsl:text>#</xsl:text>
428 <xsl:value-of select="substring-before(string(),'make')"/>
429 <xsl:text>make -k</xsl:text>
430 <xsl:value-of select="substring-after(string(),'make')"/>
431 <xsl:text> || true&#xA;</xsl:text>
432 </xsl:if>
433 </xsl:template>
434
435 <xsl:template match="userinput">
436 <xsl:apply-templates/>
437 </xsl:template>
438
439 <xsl:template match="replaceable">
[63fc514]440<!-- Not needed anymore
[5fb652f]441 <xsl:choose>
442 <xsl:when test="ancestor::sect1[@id='xorg7-server']">
443 <xsl:text>$SRC_DIR/MesaLib</xsl:text>
444 </xsl:when>
[63fc514]445 <xsl:otherwise> -->
[5fb652f]446 <xsl:text>**EDITME</xsl:text>
447 <xsl:apply-templates/>
448 <xsl:text>EDITME**</xsl:text>
[63fc514]449<!-- </xsl:otherwise>
450 </xsl:choose> -->
[3c10176]451 </xsl:template>
452
453</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.