ソースを参照

Pin to specific commits

Vecna 3 週間 前
コミット
b7ea506dbe
1 ファイル変更26 行追加13 行削除
  1. 26 13
      scripts/setup.sh

+ 26 - 13
scripts/setup.sh

@@ -1,8 +1,26 @@
 #!/bin/bash
 
+# Clone a specific branch and commit of a repo
+clone() {
+    branch="$1"
+    url="$2"
+    dirname="$3"
+    commit="$4"
+
+    if [ -n "$branch" ]; then
+        git clone -b "$branch" "$url" "$dirname" || return 1
+    else
+        git clone "$url" "$dirname" || return 1
+    fi
+
+    cd "$dirname" && \
+        git checkout "$commit" && \
+        cd ..
+}
+
 ## Belarus 2020-2021
 
-git clone -b main https://git-crysp.uwaterloo.ca/vvecna/belarus-2020-2021.git
+clone main https://git-crysp.uwaterloo.ca/vvecna/belarus-2020-2021 belarus-2020-2021 d54b2f4a0a9612088623a67ed30c9f5183a10de5
 
 ## Build docker for analysis
 
@@ -11,18 +29,13 @@ docker build -t tp-analysis .
 ## Lox/Troll Patrol
 
 # Set up dependencies
-git clone https://github.com/arkworks-rs/spongefish && \
-    cd spongefish && \
-    git checkout fcc277f8a857fdeeadd7cca92ab08de63b1ff1a1 && \
-    cd .. && \
-git clone -b victor/artifact https://github.com/sigma-rs/sigma-proofs && \
-git clone -b artifact https://git-crysp.uwaterloo.ca/SigmaProtocol/sigma-compiler && \
-git clone -b artifact https://git-crysp.uwaterloo.ca/SigmaProtocol/cmz
-
-# Clone the three versions of Lox repo
-git clone -b lox-original https://git-crysp.uwaterloo.ca/vvecna/lox-troll-patrol-extension.git lox-old && \
-git clone -b lox-extension https://git-crysp.uwaterloo.ca/vvecna/lox-troll-patrol-extension.git lox-new && \
-git clone -b main https://git-crysp.uwaterloo.ca/vvecna/lox-troll-patrol-extension.git troll-patrol && \
+clone "" https://github.com/arkworks-rs/spongefish spongefish fcc277f8a857fdeeadd7cca92ab08de63b1ff1a1 && \
+clone victor/artifact https://github.com/sigma-rs/sigma-proofs sigma-proofs 50716322b5b0d8a2b03c4637d5f4a8ee092c8b36 && \
+clone artifact https://git-crysp.uwaterloo.ca/SigmaProtocol/sigma-compiler sigma-compiler e00bc5aee794bccad5e1ae4383ad83c2e7815340 && \
+clone artifact https://git-crysp.uwaterloo.ca/SigmaProtocol/cmz cmz 07072dcd2c123aa7e9b56027cd7804fbe67c9bfb && \
+clone lox-original https://git-crysp.uwaterloo.ca/vvecna/lox-troll-patrol-extension.git lox-old 2b951fe877f9ea39b4adf0faf18be312ef25ace9 && \
+clone lox-extension https://git-crysp.uwaterloo.ca/vvecna/lox-troll-patrol-extension.git lox-new f0c0729b139a158e7ace88d4ea6de66b42d9b2c3 && \
+clone main https://git-crysp.uwaterloo.ca/vvecna/lox-troll-patrol-extension.git troll-patrol 1f7dc060c8984a8fcda681a190df902e50610111
 
 # Copy Dockerfile to lox-new and troll-patrol
 cp conf/Dockerfile lox-new/