Skip to content

Commit

Permalink
Create sui-setup.sh startup script for Cargo install through genesis (M…
Browse files Browse the repository at this point in the history
…ystenLabs#1819)

* Create sui-setup.sh

startup script for Cargo install through genesis

* Update sui-setup.sh

Replace cargo installation with confirmation and link to doc for install

* Update sui-setup.sh

Add directory removal

* Update sui-setup.sh

Make path to script explicit

* Update sui-setup.sh

Make doc comments better still

* Update sui-setup.sh

Display recommendation for manual install of VSCode extension in output

* Update sui-setup.sh

Attempting to add standard license header
  • Loading branch information
Clay-Mysten authored May 10, 2022
1 parent 5456518 commit 5ff6899
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions doc/utils/sui-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright (c) 2022, Mysten Labs, Inc.
# SPDX-License-Identifier: Apache-2.0
#!/bin/bash
# Prereqs: Rust Cargo, Git CLI, and GitHub account
# Usage: set up environment for Sui development
# Run `sui-setup.sh` in the directory to download source
shopt -s nullglob
set -e
set -o pipefail

## Confirm or get Cargo with Rust toolchain
command -v cargo >/dev/null 2>&1 || { echo "Cargo (https://doc.rust-lang.org/cargo/getting-started/installation.html) is not installed or missing from PATH, exiting."; return 1; }

## Remove sui directory if it already exists
rm -rf sui/

## Build and install Sui binaries
cargo install --locked --git https://github.com/MystenLabs/sui.git --branch "devnet" sui

## Install Move Analyzer language server plugin
cargo install --git https://github.com/move-language/move move-analyzer

## Download Sui source code
git clone https://github.com/MystenLabs/sui.git

## Create Wallet configuration
sui genesis --force

## Recommend manual install of VSCode extension
echo "Now install the Move Analyzer VSCode extension per: https://marketplace.visualstudio.com/items?itemName=move.move-analyzer"

# unset it now
shopt -u nullglob

0 comments on commit 5ff6899

Please sign in to comment.