this will have to suffice until a proper make/build system is created.
[bootmanager.git] / build.sh
diff --git a/build.sh b/build.sh
new file mode 100755 (executable)
index 0000000..361d5af
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+# build a bash script that can be executed by the boot cd,
+# and contains embedded in it the boot manager.
+
+DEST_SCRIPT=bootmanager.sh
+
+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/alpina-v3/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