summaryrefslogtreecommitdiff
path: root/genbootstrap.sh
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-04-13 01:41:11 -0700
committerOri Bernstein <ori@eigenstate.org>2015-04-13 01:41:11 -0700
commit37468d379ec14b26a7748953676a17aeab1757b3 (patch)
tree18ab9cfedaec74a4eeb13e6a6e7984e3bc508db4 /genbootstrap.sh
parent03ce0ae18518e2686e8b30e25cf47e2ad1afe6ad (diff)
downloadmc-37468d379ec14b26a7748953676a17aeab1757b3.tar.gz
Add boostrap generation script.
Diffstat (limited to 'genbootstrap.sh')
-rwxr-xr-xgenbootstrap.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/genbootstrap.sh b/genbootstrap.sh
new file mode 100755
index 0000000..d6e64c5
--- /dev/null
+++ b/genbootstrap.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+
+export MYR_MUSE=../muse/muse
+export MYR_MC=../6/6m
+
+mbld clean
+# The generated shell script should be a compatible bourne
+# shell script.
+echo '#!/bin/sh' > bootstrap.sh
+echo 'pwd=`pwd`' >> bootstrap.sh
+mbld | \
+ sed "s:Entering directory '\\(.*\\)':\tcd \$pwd/\1:g" | \
+ sed "s:Leaving directory.*:\tcd \$pwd:g" | \
+ grep $'^\t' | \
+ sed 's/.*/echo &\n&/' | \
+ tee -a bootstrap.sh
+chmod +x bootstrap.sh