#!/bin/sh rustc --version || curl https://sh.rustup.rs -sSf | sh NEXUS_HOME=$HOME/.nexus GREEN='\033[1;32m' ORANGE='\033[1;33m' NC='\033[0m' # No Color [ -d $NEXUS_HOME ] || mkdir -p $NEXUS_HOME while [ -z "$NONINTERACTIVE" ] && [ ! -f "$NEXUS_HOME/prover-id" ]; do read -p "Do you agree to the Nexus Beta Terms of Use (https://nexus.xyz/terms-of-use)? (Y/n) " yn &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 PROVER_ID=$(cat $NEXUS_HOME/prover-id 2>/dev/null) if [ -z "$NONINTERACTIVE" ] && [ "${#PROVER_ID}" -ne "28" ]; then echo "\nTo receive credit for proving in Nexus testnets..." echo "\t1. Go to ${GREEN}https://beta.nexus.xyz${NC}" echo "\t2. On the bottom left hand corner, copy the ${ORANGE}prover id${NC}" echo "\t3. Paste the ${ORANGE}prover id${NC} here. Press Enter to continue.\n" read -p "Enter your Prover Id (optional)> " PROVER_ID $NEXUS_HOME/prover-id echo Prover id saved to $NEXUS_HOME/prover-id. break; else echo Unable to validate $PROVER_ID. Please make sure the full prover id is copied. fi read -p "Prover Id (optional)> " PROVER_ID