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