do 1.18 KB
Newer Older
bernd's avatar
bernd committed
1 2 3 4 5 6 7 8
#!/bin/bash

echo "This script builds net2o from scratch"

GFORTH=gforth-0.7.9_20131227

# get net2o itself

bernd's avatar
bernd committed
9 10 11 12 13
if [ ! -f net2o.fossil ]
then
    fossil clone http://fossil.net2o.de/net2o net2o.fossil
    fossil open net2o.fossil
fi
bernd's avatar
bernd committed
14 15 16

# get, build, and install Gforth

17
which gforth 1>/dev/null 2>/dev/null && GF=$(gforth --version 2>&1 | tr ' ' '-')
bernd's avatar
bernd committed
18
(which gforth 1>/dev/null 2>/dev/null && test '!' "$GF" "<" "$GFORTH") || (
bernd's avatar
bernd committed
19
    wget -c http://www.complang.tuwien.ac.at/forth/gforth/Snapshots/$GFORTH.tar.gz
bernd's avatar
bernd committed
20
    (tar zxf $GFORTH.tar.gz; cd $GFORTH; ./configure && make && sudo make install)
21
)
bernd's avatar
bernd committed
22

bernd's avatar
bernd committed
23 24 25 26 27 28 29 30 31 32 33 34 35
# we test for an existing Gforth that can load net2o.fs
# if the snapshot doesn't, try the git version

gforth-fast net2o.fs -e bye 1>/dev/null 2>/dev/null || (
    if [ -d gforth ]
    then
	(cd gforth; git pull)
    else
	git clone git://git.savannah.gnu.org/gforth.git
    fi
    (cd gforth; ./autogen.sh && ./configure && make && sudo make install)
)

bernd's avatar
bernd committed
36 37 38 39 40 41 42
# get, build, and install ed25519-donna

git clone https://github.com/forthy42/ed25519-donna.git -b bernd
(cd ed25519-donna; autoconf && ./configure && make && sudo make install)

# build and install keccak

bernd's avatar
bernd committed
43
(cd keccak; ./autogen.sh && make && sudo make install)