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-10-09 00:47:55 +00:00
|
|
|
|
|
|
|
while [ -z "$NONINTERACTIVE" ]; do
|
|
|
|
read -p "Do you agree to the Nexus Beta Terms of Use (https://nexus.xyz/terms-of-use)? (Y/n) " yn </dev/tty
|
|
|
|
case $yn in
|
|
|
|
[Nn]* ) exit;;
|
|
|
|
[Yy]* ) break;;
|
|
|
|
"" ) break;;
|
|
|
|
* ) echo "Please answer yes or no.";;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
git --version 2>&1 >/dev/null
|
|
|
|
GIT_IS_AVAILABLE=$?
|
|
|
|
if [ $GIT_IS_AVAILABLE != 0 ]; then
|
|
|
|
echo Unable to find git. Please install it and try again.
|
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d "$NEXUS_HOME/network-api" ]; then
|
|
|
|
echo "$NEXUS_HOME/network-api exists. Updating.";
|
|
|
|
(cd $NEXUS_HOME/network-api && git pull)
|
2024-09-05 19:45:22 +00:00
|
|
|
else
|
2024-09-25 16:03:20 +00:00
|
|
|
mkdir -p $NEXUS_HOME
|
2024-10-09 00:50:11 +00:00
|
|
|
(cd $NEXUS_HOME && git clone https://github.com/nexus-xyz/network-cli)
|
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)
|