added shell script to do the setup for you
This commit is contained in:
parent
5f798337c4
commit
54d793e90b
1 changed files with 57 additions and 0 deletions
57
setup.sh
Executable file
57
setup.sh
Executable file
|
@ -0,0 +1,57 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -a elm-starter-kit ]
|
||||
then
|
||||
echo "Looks like you've already run this."
|
||||
echo "\`rm -rf elm-start-kit\` and try again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir elm-starter-kit
|
||||
cd elm-starter-kit
|
||||
|
||||
git clone git@github.com:elm-lang/Elm.git
|
||||
git clone git@github.com:elm-lang/elm-reactor.git
|
||||
git clone git@github.com:michaelbjames/elm-reactor-starter.git
|
||||
|
||||
|
||||
status=0
|
||||
|
||||
cd elm
|
||||
echo "Installing elm in the sandbox"
|
||||
cabal sandbox init
|
||||
status=$(($?+$status))
|
||||
if [ $status -gt 0 ]
|
||||
then
|
||||
echo "\`cabal sandbox init\` failed, do you have cabal?"
|
||||
exit $status
|
||||
fi
|
||||
|
||||
cabal install -j --only-dependencies && cabal configure && cabal build && cabal install
|
||||
status=$(($?+$status))
|
||||
if [ $status -gt 0 ]
|
||||
then
|
||||
echo "Installing elm failed, please email the list with the error!"
|
||||
exit $status
|
||||
fi
|
||||
|
||||
cd ../elm-reactor
|
||||
echo "Installing elm-reactor in a sandbox"
|
||||
cabal sandbox init
|
||||
cabal sandbox add-source ../elm
|
||||
cabal install -j --only-dependencies && cabal configure && cabal build && cabal install
|
||||
|
||||
status=$(($?+$status))
|
||||
if [ $status -gt 0 ]
|
||||
then
|
||||
echo "Installing elm-reactor failed, please email the list with the error!"
|
||||
exit $status
|
||||
fi
|
||||
|
||||
cd ../elm-reactor-starter/todo
|
||||
elm --make --only-js Todo.elm
|
||||
cd ..
|
||||
|
||||
echo "Setup complete."
|
||||
echo "Navigate to elm-reactor-starter and run:"
|
||||
echo "../elm-reactor/dist/build/elm-reactor/elm-reactor"
|
Loading…
Reference in a new issue