X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=build.sh;h=36e8ee73ec2633e6b81caee1fed154d33d9d2631;hb=refs%2Fheads%2Fplanetlab-3_3-bootcd-branch;hp=2334f2a0734559144f072cdd8a3ae79e1f418e72;hpb=2c02d23b234503e709b804cde1534dcf7cbad0b6;p=bootmanager.git diff --git a/build.sh b/build.sh index 2334f2a..36e8ee7 100755 --- 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