<commit_before>#!/bin/bash
set -e
set -x

KODINGROOT=$GOPATH/src/github.com/koding

killall main || true

rm -rf kite

echo "Installing etcd"
test -d "_etcd" || git clone https://github.com/coreos/etcd _etcd
rm -rf _etcd/kontrol_test ||: #remove previous folder
cd _etcd; ./build; ./bin/etcd --name=kontrol --data-dir=kontrol_test &

go get -u github.com/koding/kite
echo "downloading dependencies of github.com/koding/kite"

cd $KODINGROOT/kite/
go get -u -d -v ./...
cd -

# delete existing kite.key
rm -rf $HOME/.kite

# delete existing kontrol data
rm -rf /tmp/kontrol-data

go run $KODINGROOT/kite/testutil/writekey/main.go -stdout > kontrol_client.key

# initialize machine with new kite.key
go run $KODINGROOT/kite/kontrol/kontrol/main.go -public-key ./test/data/test_key.pub -private-key ./test/data/test_key.priv -init -username testuser -kontrol-url "http://0.0.0.0:4000"

# run essential kites
go run $KODINGROOT/kite/kontrol/kontrol/main.go -public-key ./test/data/test_key.pub -private-key ./test/data/test_key.priv -data-dir /tmp/kontrol-data &
<commit_msg>travis: need to cd back after installing etcd<commit_after>#!/bin/bash
set -e
set -x

KODINGROOT=$GOPATH/src/github.com/koding

killall main || true

rm -rf kite

echo "Installing etcd"
test -d "_etcd" || git clone https://github.com/coreos/etcd _etcd
rm -rf _etcd/kontrol_test ||: #remove previous folder
cd _etcd; ./build; ./bin/etcd --name=kontrol --data-dir=kontrol_test &
cd -

go get -u github.com/koding/kite
echo "downloading dependencies of github.com/koding/kite"

cd $KODINGROOT/kite/
go get -u -d -v ./...
cd -

# delete existing kite.key
rm -rf $HOME/.kite

# delete existing kontrol data
rm -rf /tmp/kontrol-data

go run $KODINGROOT/kite/testutil/writekey/main.go -stdout > kontrol_client.key

# initialize machine with new kite.key
go run $KODINGROOT/kite/kontrol/kontrol/main.go -public-key ./test/data/test_key.pub -private-key ./test/data/test_key.priv -init -username testuser -kontrol-url "http://0.0.0.0:4000"

# run essential kites
go run $KODINGROOT/kite/kontrol/kontrol/main.go -public-key ./test/data/test_key.pub -private-key ./test/data/test_key.priv -data-dir /tmp/kontrol-data &

{'fraction_non_alphanumeric': 0.143184947223497, 'fraction_numerical': 0.0073428178063331805, 'mean_word_length': 3.5511482254697286, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5358724', 'n_tokens_mistral': 877, 'n_tokens_neox': 832, 'n_words': 204}