aboutsummaryrefslogtreecommitdiffstats
path: root/bin/install_eth_dep.sh
blob: 2e1b5ff000a6b481186a3b46e1985448d3e8b3e1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

if [ -e .dep/libsecp256k1 ]; then
  exit 0
fi

rm -rf vendor/github.com/dexon-foundation/dexon/crypto/secp256k1/libsecp256k1
if [ ! -d .dep/libsecp256k1 ]; then
  git init .dep/libsecp256k1
  cd .dep/libsecp256k1
  git remote add origin https://github.com/dexon-foundation/dexon.git
  git config core.sparsecheckout true
  echo "crypto/secp256k1/libsecp256k1/*" >> .git/info/sparse-checkout
  cd ../../
fi
cd .dep/libsecp256k1
git pull --depth=1 origin master
cd ../../
cp -r .dep/libsecp256k1/crypto/secp256k1/libsecp256k1 \
  vendor/github.com/dexon-foundation/dexon/crypto/secp256k1