2024-08-08 23:49:23 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2024-09-05 19:45:22 +00:00
|
|
|
rustc --version || curl https://sh.rustup.rs -sSf | sh
|
|
|
|
NEXUS_HOME=$HOME/.nexus
|
2024-09-25 16:03:20 +00:00
|
|
|
CLI_ZIP=/tmp/nexus-network-api.zip
|
|
|
|
curl -L --verbose "https://docs.google.com/uc?export=download&id=1kcbEeKpVEyvIqL-_cgR5sYdZe_fOEPs6" > $CLI_ZIP
|
2024-09-05 19:45:22 +00:00
|
|
|
if [ -d "$NEXUS_HOME" ]; then
|
|
|
|
echo "$NEXUS_HOME exists. Updating.";
|
2024-09-25 16:03:20 +00:00
|
|
|
(cd $NEXUS_HOME && rm -rf network-api && unzip $CLI_ZIP)
|
|
|
|
# TODO: Once GitHub repo is public, do this instead
|
|
|
|
# (cd $NEXUS_HOME && git pull)
|
2024-09-05 19:45:22 +00:00
|
|
|
else
|
2024-09-25 16:03:20 +00:00
|
|
|
# TODO: Once GitHub repo is public, do this instead
|
|
|
|
# git clone git@github.com:nexus-xyz/network-cli $NEXUS_HOME
|
|
|
|
mkdir -p $NEXUS_HOME
|
|
|
|
(cd $NEXUS_HOME && unzip $CLI_ZIP)
|
2024-09-05 19:45:22 +00:00
|
|
|
fi
|
|
|
|
|
2024-09-25 16:03:20 +00:00
|
|
|
(cd $NEXUS_HOME/network-api/clients/cli && cargo run --release --bin prover -- beta.orchestrator.nexus.xyz)
|