[Lsb-messages] /var/www/bzr/lsb/devel/puppet-lsb r48: cleanup on betaspecs

Mats Wichmann mats at linuxfoundation.org
Tue Jan 24 22:19:11 UTC 2012


------------------------------------------------------------
revno: 48
committer: Mats Wichmann <mats at linuxfoundation.org>
branch nick: puppet-lsb
timestamp: Tue 2012-01-24 15:19:11 -0700
message:
  cleanup on betaspecs
modified:
  modules/apachehttpd/files/update-betaspecs
-------------- next part --------------
=== modified file 'modules/apachehttpd/files/update-betaspecs'
--- a/modules/apachehttpd/files/update-betaspecs	2012-01-21 20:19:04 +0000
+++ b/modules/apachehttpd/files/update-betaspecs	2012-01-24 22:19:11 +0000
@@ -1,6 +1,10 @@
 #!/bin/sh -e
-
-# Set up test environment for testing script changes
+#
+# populate the "betaspecs" website area with FHS, LSB specs
+#
+# TODO (see bug 3344) - need an index page for the top level
+# betaspecs should be exported by specific revision (probably tag)
+# snapshot specs can just be current head
 
 if [ -d /srv/www/vhosts/linuxbase.org ]; then
     BETASPECS_PATH=/srv/www/vhosts/linuxbase.org/betaspecs
@@ -8,13 +12,17 @@
     BETASPECS_PATH=/tmp/betaspecs_path
 fi
 
-# Export the current FHS spec.
+BRANCHURL=http://bzr.linuxfoundation.org/lsb/devel
 
 BZR_PROGRESS_BAR=none
 export BZR_PROGRESS_BAR
 
+# obtain the current FHS spec from bzr
+
 [ -d /tmp/fhs-spec ] && rm -rf /tmp/fhs-spec
-bzr export /tmp/fhs-spec http://bzr.linuxfoundation.org/lsb/devel/fhs-spec
+bzr export /tmp/fhs-spec $BRANCHURL/fhs-spec
+
+# built specs are not in bzr, have to build them here
 
 cd /tmp/fhs-spec
 make -s fhs.txt fhs.html 
@@ -43,29 +51,19 @@
 cd /tmp
 rm -rf fhs-spec
 
-# grab the LSB specifications from booksets and books branches,
+# LSB specs are already built. Grab them from booksets and books branches,
 # but only the directories that begin with LSB- are "published"
 
-branch=http://bzr.linuxfoundation.org/lsb/devel/booksets
-for path in $(bzr ls $branch)
-do
-    book=$(echo $path | sed "s,$branch/,,")
-    if [ $(echo $book | grep "^LSB-" | wc -l) -ne 0 ]
-    then
-	[ -d $BETASPECS_PATH/lsb/$book ] && rm -rf $BETASPECS_PATH/lsb/$book
-	mkdir -p $BETASPECS_PATH/lsb/$book
-	bzr export $BETASPECS_PATH/lsb/$book $path
-    fi
-done
-
-branch=http://bzr.linuxfoundation.org/lsb/devel/books
-for path in $(bzr ls $branch)
-do
-    book=$(echo $path | sed "s,$branch/,,")
-    if [ $(echo $book | grep "^LSB-" | wc -l) -ne 0 ]
-    then
-	[ -d $BETASPECS_PATH/lsb/$book ] && rm -rf $BETASPECS_PATH/lsb/$book
-	mkdir -p $BETASPECS_PATH/lsb/$book
-	bzr export $BETASPECS_PATH/lsb/$book $path
-    fi
+for branch in $BRANCHURL/booksets $BRANCHURL/books
+do
+    for path in $(bzr ls $branch)
+    do
+	book=$(echo $path | sed "s,$branch/,,")
+	if [ $(echo $book | grep "^LSB-" | wc -l) -ne 0 ]
+	then
+	    [ -d $BETASPECS_PATH/lsb/$book ] && rm -rf $BETASPECS_PATH/lsb/$book
+	    mkdir -p $BETASPECS_PATH/lsb/$book
+	    bzr export $BETASPECS_PATH/lsb/$book $path
+	fi
+    done
 done



More information about the lsb-messages mailing list