This commit was manufactured by cvs2svn to create branch
[bootmanager.git] / build.sh
index 2334f2a..36e8ee7 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -1,9 +1,26 @@
 #!/bin/bash
 
-rm -f *.fo *.pdf pdn-titlepage.xsl
+# build a bash script that can be executed by the boot cd,
+# and contains embedded in it the boot manager.
 
-#xsltproc -output pdn-titlepage.xsl \
-#    /usr/share/sgml/docbook/xsl-stylesheets/template/titlepage.xsl \
-#    pdn-titlepage.xml
+DEST_SCRIPT=bootmanager.sh
 
-xmlto -x pdn-pdf-style.xsl pdf boot-manager-pdn.xml
+cat > $DEST_SCRIPT << '_EOF_'
+#!/bin/bash
+set -e
+
+UUDECODE=/usr/bin/uudecode
+
+# once we get the beta cds out of use, this can be removed
+if [ ! -x $UUDECODE ]; then
+  UUDECODE=/tmp/uudecode
+  curl -s http://boot.planet-lab.org/boot/uudecode.gz | gzip -d -c > $UUDECODE
+  chmod +x $UUDECODE
+fi
+
+_EOF_
+echo '($UUDECODE | /bin/tar -C /tmp -xj) << _EOF_' >> $DEST_SCRIPT
+tar -cj source/ | uuencode -m - >> $DEST_SCRIPT
+echo '_EOF_' >> $DEST_SCRIPT
+echo 'cd /tmp/source' >> $DEST_SCRIPT
+echo 'chmod +x BootManager.py && ./BootManager.py' >> $DEST_SCRIPT