Add new terms prompt

This commit is contained in:
Collin Jackson 2024-10-08 17:13:14 -07:00
parent 6566b3f928
commit 26dc9bf576

View File

@ -2,18 +2,22 @@
rustc --version || curl https://sh.rustup.rs -sSf | sh
NEXUS_HOME=$HOME/.nexus
CLI_ZIP=/tmp/nexus-network-api.zip
curl -L --verbose "https://docs.google.com/uc?export=download&id=1kcbEeKpVEyvIqL-_cgR5sYdZe_fOEPs6" > $CLI_ZIP
if [ -d "$NEXUS_HOME" ]; then
echo "$NEXUS_HOME exists. Updating.";
(cd $NEXUS_HOME && rm -rf network-api && unzip $CLI_ZIP)
# TODO: Once GitHub repo is public, do this instead
# (cd $NEXUS_HOME && git pull)
while true; 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
[Yy]* ) break;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done
if [ -d "$NEXUS_HOME/network-api" ]; then
echo "$NEXUS_HOME/network-api exists. Updating.";
(cd $NEXUS_HOME/network-api && git pull)
else
# 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)
(cd $NEXUS_HOME && git clone git@github.com:nexus-xyz/network-cli)
fi
(cd $NEXUS_HOME/network-api/clients/cli && cargo run --release --bin prover -- beta.orchestrator.nexus.xyz)