setup.sh 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/bash
  2. # Clone a specific branch and commit of a repo
  3. clone() {
  4. url="$1"
  5. dirname="$2"
  6. commit="$3"
  7. git clone "$url" "$dirname" || return 1
  8. cd "$dirname" && \
  9. git checkout "$commit" && \
  10. cd ..
  11. }
  12. ## Belarus 2020-2021
  13. clone https://git-crysp.uwaterloo.ca/vvecna/belarus-2020-2021 belarus-2020-2021 f6f0f03155c418e43582e072e767b7324f84740b
  14. ## Build docker for analysis
  15. docker build -t tp-analysis .
  16. ## Lox/Troll Patrol
  17. # Set up dependencies
  18. clone https://github.com/arkworks-rs/spongefish spongefish fcc277f8a857fdeeadd7cca92ab08de63b1ff1a1 && \
  19. clone https://github.com/sigma-rs/sigma-proofs sigma-proofs 50716322b5b0d8a2b03c4637d5f4a8ee092c8b36 && \
  20. clone https://git-crysp.uwaterloo.ca/SigmaProtocol/sigma-compiler sigma-compiler e00bc5aee794bccad5e1ae4383ad83c2e7815340 && \
  21. clone https://git-crysp.uwaterloo.ca/SigmaProtocol/cmz cmz 07072dcd2c123aa7e9b56027cd7804fbe67c9bfb && \
  22. clone https://git-crysp.uwaterloo.ca/vvecna/lox-troll-patrol-extension.git lox-old 2b951fe877f9ea39b4adf0faf18be312ef25ace9 && \
  23. clone https://git-crysp.uwaterloo.ca/vvecna/lox-troll-patrol-extension.git lox-new 349f92f4c4706e30b6960408ae167227c6b8ec82 && \
  24. clone https://git-crysp.uwaterloo.ca/vvecna/lox-troll-patrol-extension.git troll-patrol 1165196768a4c7f2a975bc38f799cbac2d557c03
  25. # Copy Dockerfile to lox-new and troll-patrol
  26. cp conf/Dockerfile lox-new/
  27. cp conf/Dockerfile troll-patrol/
  28. # For each, build the docker container
  29. for i in lox-old lox-new troll-patrol; do
  30. cd "$i" && docker build -t "$i" . && cd ..
  31. done