this will have to suffice until a proper make/build system is created.
authorAaron Klingaman <alk@cs.princeton.edu>
Thu, 26 May 2005 17:10:19 +0000 (17:10 +0000)
committerAaron Klingaman <alk@cs.princeton.edu>
Thu, 26 May 2005 17:10:19 +0000 (17:10 +0000)
this compresses the bootmanager sources, base64 encodes them, and creates
a single bash script that does the reverse of that, and executes the
bootmanager

build.sh [new file with mode: 0755]

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