| 123456789101112131415161718192021222324252627282930313233343536373839 |
- #!/bin/bash
- # cd into the directory containing this script (from the bash faq 028)
- if [[ $BASH_SOURCE = */* ]]; then
- cd -- "${BASH_SOURCE%/*}/" || exit
- fi
- cd ..
- fetch_repo() {
- repo_url="$1"
- commit_id="$2"
- dir_name="$3"
- if [ -d "$dir_name" ]; then
- ( cd "$dir_name" && git fetch origin --tags && \
- git checkout "$commit_id" )
- else
- git clone "$repo_url" "$dir_name" && \
- ( cd "$dir_name" && git checkout "$commit_id" && \
- if [ -e "../patches/${dir_name}.diff" ]; then
- patch -p1 < ../patches/${dir_name}.diff
- fi )
- fi
- }
- fetch_repos() {
- fetch_repo https://github.com/arkworks-rs/spongefish v0.4.0 spongefish && \
- fetch_repo https://github.com/mmaker/sigma-rs v0.2.1 sigma-proofs && \
- fetch_repo https://git-crysp.uwaterloo.ca/SigmaProtocol/sigma-compiler 0.2.1 sigma-compiler && \
- fetch_repo https://git-crysp.uwaterloo.ca/SigmaProtocol/cmz 0.2.1 cmz && \
- fetch_repo gogs@git-crysp.uwaterloo.ca:iang/onyinyang-lox-fork.git artifact application-lox && \
- fetch_repo gogs@git-crysp.uwaterloo.ca:iang/onyinyang-lox-fork.git artifact-zkp application-lox-zkp && \
- # fetch_repo https://gitlab.torproject.org/onyinyang/lox.git/ XXXXXXX application-lox && \
- # fetch_repo https://gitlab.torproject.org/onyinyang/lox.git/ XXXXXXX application-lox-zkp && \
- fetch_repo https://github.com/ooni/userauth atifact-v0.1 application-ooni
- }
- fetch_repos
|