32 lines
893 B
Bash
Executable File
32 lines
893 B
Bash
Executable File
#!/bin/sh
|
|
|
|
rustc --version || curl https://sh.rustup.rs -sSf | sh
|
|
NEXUS_HOME=$HOME/.nexus
|
|
|
|
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)
|
|
else
|
|
mkdir -p $NEXUS_HOME
|
|
(cd $NEXUS_HOME && git clone https://github.com/nexus-xyz/network-cli)
|
|
fi
|
|
|
|
(cd $NEXUS_HOME/network-api/clients/cli && cargo run --release --bin prover -- beta.orchestrator.nexus.xyz)
|