File tree Expand file tree Collapse file tree 2 files changed +10
-17
lines changed
Expand file tree Collapse file tree 2 files changed +10
-17
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -euo pipefail
33
4- NETWORK=${NETWORK:- }
5- VERSION=${VERSION:- ${NETWORK:- " latest" } }
4+ export AZTEC_PATH=" ${AZTEC_PATH:- $HOME / .aztec} "
5+ export VERSION=" ${VERSION:- $(cat " $AZTEC_PATH /default_version" )} "
6+ export DOCKER_REPO=" ${DOCKER_REPO:- " aztecprotocol/aztec" } "
67
7- DOCKER_REPO=${DOCKER_REPO:- " aztecprotocol/aztec" }
88# Take copy of command-line arguments, so we can mutate to parse.
99if [ $# -eq 0 ]; then
1010 args=(" --help" )
1111else
1212 args=(" $@ " )
1313fi
14+
1415while [ " $# " -gt 0 ]; do
1516 case $1 in
1617 -p | --port)
@@ -35,14 +36,6 @@ while [ "$#" -gt 0 ]; do
3536 ADMIN_PORT=" $2 "
3637 shift 2
3738 ;;
38- --pxe.network)
39- # Set version to user-specified network (e.g. 'devnet')
40- VERSION=" $2 "
41- echo " Using aztecprotocol/aztec:$VERSION "
42- # Turn on proving if connecting to a network.
43- export PXE_PROVER_ENABLED=1
44- shift 2
45- ;;
4639 --help)
4740 NO_PORT_FORWARDING=1
4841 shift 1
Original file line number Diff line number Diff line change 1717 NON_INTERACTIVE=${NON_INTERACTIVE:- 0}
1818fi
1919
20- AZTEC_PATH=$ HOME /.aztec
20+ AZTEC_PATH=" ${AZTEC_PATH :- $ HOME/ .aztec} "
2121BIN_PATH=${BIN_PATH:- $AZTEC_PATH / bin}
2222
2323# Define version if specified, otherwise set to "latest".
@@ -146,15 +146,14 @@ if ! docker info &>/dev/null; then
146146 exit 1
147147fi
148148
149+ mkdir -p " $AZTEC_PATH "
150+ TMP_VERSION_FILE=" $( mktemp) "
151+ echo " $VERSION " > " $TMP_VERSION_FILE "
152+
149153# Pull the aztec container.
150154if [ -z " ${SKIP_PULL:- } " ]; then
151155 info " Pulling aztec version $VERSION ..."
152156 docker pull aztecprotocol/aztec:$VERSION
153-
154- # If not latest, retag to be latest so it runs from scripts.
155- if [ $VERSION != " latest" ]; then
156- docker tag aztecprotocol/aztec:$VERSION aztecprotocol/aztec:latest
157- fi
158157fi
159158
160159info " Installing scripts in $BIN_PATH ..."
@@ -165,6 +164,7 @@ install_bin aztec-up
165164install_bin aztec-nargo
166165install_bin aztec-postprocess-contract
167166install_bin aztec-wallet
167+ mv " $TMP_VERSION_FILE " " $AZTEC_PATH /default_version"
168168
169169update_path_env_var $BIN_PATH
170170
You can’t perform that action at this time.
0 commit comments