-
Notifications
You must be signed in to change notification settings - Fork 4
/
manage.sh
executable file
·64 lines (50 loc) · 1.08 KB
/
manage.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
function dev () {
ghcid -c 'stack repl zeno:lib'
}
function devtest () {
ghcid -c 'stack repl zeno --test --main-is :zeno-test' --test ':main --color always'
}
PATH="../komodo/src/:$PATH"
function runKmdDev () {
komodod -ac_name=TXSCLZDEV -ac_supply=999999 -ac_reward=1000000 \
-addressindex=1 \
-ac_blocktime=3 \
-ac_nk=96,5 \
-ac_sapling=2 \
-testnode=1 &
cpulimit -l 33 -p $!
}
function queryKmdDev () {
komodo-cli --ac_name=TXSCLZDEV $@
}
function dot () {
# eg: ./manage.sh dot | xdot -
graphmod -
# --collapse=Module
}
function update-fast() {
git pull
build-fast
}
function install-fast() {
build-fast
stack install
}
fast_build_ghc_ops="-j4 +RTS -A128m -n2m -qg -RTS"
function build-fast() {
stack build --fast --ghc-options $fast_build_ghc_ops
}
function test-fast() {
stack test --ghc-options $fast_build_ghc_ops
}
function build-profile () {
stack build --profile --ghc-options=-fprof-auto-top
}
cmd=$1;
if [[ "$cmd" == "" ]]; then
echo "Usage: ./manage.sh COMMAND [ARGS]";
exit 1;
fi
shift
$cmd $@