summaryrefslogtreecommitdiff
path: root/genbootstrap.sh
blob: fafee066483f2029439f60c13928f6e6c3f0620a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash

export MYR_MUSE=../muse/muse
export MYR_MC=../6/6m
export MYR_RT=../rt/_myrrt.o

./mbldwrap.sh
cp mbld/mbld xmbld
./xmbld clean
# The generated shell script should be a compatible bourne
# shell script.
bootscript=bootstrap+`uname -s`-`uname -m`
echo '#!/bin/sh' > bootstrap.sh
echo 'pwd=`pwd`' >> bootstrap.sh
./xmbld -Rnone | \
    sed "s:Entering directory '\\(.*\\)':\tcd \$pwd/\\1:g" | \
    sed "s:Leaving directory.*:\tcd \$pwd:g" | \
    sed "s:\\([a-zA-Z0-9_-]*\\)+.*:\`\$pwd/sysselect.sh \1\`:" | \
    grep $'^\t' | \
    sed $'s/.*/echo &\\\n&/' | \
    tee -a bootstrap.sh 
chmod +x bootstrap.sh
rm ./xmbld