Move Cephelepod into deprecated_compiler, create captian.sh to handle bootstrapping kraken from backup or from Cephelepod

This commit is contained in:
Nathan Braswell
2016-03-29 12:54:05 -04:00
parent 40c3e428c1
commit c7e50282ad
53 changed files with 51 additions and 19 deletions

44
captian.sh Executable file
View File

@@ -0,0 +1,44 @@
#!/bin/sh
kraken="kraken"
if [ -s "$kraken" ]
then
#echo "$kraken exists, calling"
echo "$kraken exists!"
else
echo "gotta make $kraken, testing for compilers to do so"
if ! [ -s "${kraken}_bac" ]
then
if ! [ -s "${kraken}_deprecated" ]
then
echo "no ${kraken}_deprecated, using Cephelpod"
cp -r stdlib deprecated_compiler
cp krakenGrammer.kgm deprecated_compiler
cp kraken.krak deprecated_compiler
pushd deprecated_compiler
mkdir build
pushd build
cmake ..
make
popd
mkdir build_kraken
mv kraken.krak build_kraken
pushd build_kraken
../build/kraken kraken.krak
popd
popd
cp deprecated_compiler/build_kraken/kraken/kraken ./kraken_deprecated
else
echo "${kraken}_deprecated exists, calling"
fi
./kraken_deprecated kraken.krak kraken_bac
else
echo "${kraken}_bac exists, calling"
fi
./${kraken}_bac ${kraken}.krak
fi
#./${kraken} $@