File tree Expand file tree Collapse file tree 2 files changed +26
-4
lines changed
standalone-contract/scripts Expand file tree Collapse file tree 2 files changed +26
-4
lines changed Original file line number Diff line number Diff line change 6
6
# to do reproducible build.
7
7
set -ex
8
8
9
- DOCKER_IMAGE=" docker.io/cryptape/llvm-n-rust:20240630"
9
+ DOCKER=" ${DOCKER:- docker} "
10
+ DOCKER_IMAGE=" ${DOCKER_IMAGE:- docker.io/ cryptape/ llvm-n-rust: 20240630} "
10
11
CHECKSUM_FILE_PATH=" checksums.txt"
11
12
12
13
# We are parsing command line arguments based on tips from:
@@ -23,6 +24,10 @@ while [[ $# -gt 0 ]]; do
23
24
UPDATE=" yes"
24
25
shift # past argument
25
26
;;
27
+ -s|--sudo)
28
+ SUDO=" yes"
29
+ shift # past argument
30
+ ;;
26
31
--no-clean)
27
32
NOCLEAN=" yes"
28
33
shift # past argument
53
58
TASKS+=" build "
54
59
fi
55
60
56
- docker run --rm $PROXY_ARGS -v ` pwd` :/code $DOCKER_IMAGE make $TASKS
61
+ if [[ " ${SUDO} " = " yes" ]]; then
62
+ PREFIX=" sudo"
63
+ fi
64
+
65
+ $PREFIX $DOCKER run --rm $PROXY_ARGS -v ` pwd` :/code $DOCKER_IMAGE make $TASKS
66
+ # Reset file ownerships for all files docker might touch
67
+ sudo chown -R -f ` id -u` :` id -g` checksums.txt build target
57
68
58
69
if [[ " ${UPDATE} " = " yes" ]]; then
59
70
echo " ${CHECKSUM_FILE_PATH} file is updated with latest binary hashes!"
Original file line number Diff line number Diff line change 6
6
# to do reproducible build.
7
7
set -ex
8
8
9
- DOCKER_IMAGE=" docker.io/cryptape/llvm-n-rust:20240630"
9
+ DOCKER=" ${DOCKER:- docker} "
10
+ DOCKER_IMAGE=" ${DOCKER_IMAGE:- docker.io/ cryptape/ llvm-n-rust: 20240630} "
10
11
CHECKSUM_FILE_PATH=" checksums.txt"
11
12
12
13
# We are parsing command line arguments based on tips from:
@@ -23,6 +24,10 @@ while [[ $# -gt 0 ]]; do
23
24
UPDATE=" yes"
24
25
shift # past argument
25
26
;;
27
+ -s|--sudo)
28
+ SUDO=" yes"
29
+ shift # past argument
30
+ ;;
26
31
--no-clean)
27
32
NOCLEAN=" yes"
28
33
shift # past argument
53
58
TASKS+=" build "
54
59
fi
55
60
56
- docker run --rm $PROXY_ARGS -v ` pwd` :/code $DOCKER_IMAGE make $TASKS
61
+ if [[ " ${SUDO} " = " yes" ]]; then
62
+ PREFIX=" sudo"
63
+ fi
64
+
65
+ $PREFIX $DOCKER run --rm $PROXY_ARGS -v ` pwd` :/code $DOCKER_IMAGE make $TASKS
66
+ # Reset file ownerships for all files docker might touch
67
+ sudo chown -R -f ` id -u` :` id -g` checksums.txt build target
57
68
58
69
if [[ " ${UPDATE} " = " yes" ]]; then
59
70
echo " ${CHECKSUM_FILE_PATH} file is updated with latest binary hashes!"
You can’t perform that action at this time.
0 commit comments