diff --git a/.gitignore b/.gitignore index adf3b7799618..471a601cc34b 100644 --- a/.gitignore +++ b/.gitignore @@ -120,3 +120,6 @@ configs/* era-observability/ core/tests/ts-integration/deployments-zk transactions/ + +# foundry-zksync +install \ No newline at end of file diff --git a/install b/install deleted file mode 100755 index 8bf36687e20d..000000000000 --- a/install +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -echo "Installing foundryup-zksync..." - -BASE_DIR="${XDG_CONFIG_HOME:-$HOME}" -FOUNDRY_DIR="${FOUNDRY_DIR-"$BASE_DIR/.foundry"}" -FOUNDRY_BIN_DIR="$FOUNDRY_DIR/bin" -FOUNDRY_MAN_DIR="$FOUNDRY_DIR/share/man/man1" - -BIN_URL="https://raw.githubusercontent.com/matter-labs/foundry-zksync/main/foundryup-zksync/foundryup-zksync" -BIN_PATH="$FOUNDRY_BIN_DIR/foundryup-zksync" - -# Create the .foundry bin directory and foundryup binary if it doesn't exist. -mkdir -p "$FOUNDRY_BIN_DIR" -curl -sSf -L "$BIN_URL" -o "$BIN_PATH" -chmod +x "$BIN_PATH" - -# Create the man directory for future man files if it doesn't exist. -mkdir -p "$FOUNDRY_MAN_DIR" - -# Store the correct profile file (i.e. .profile for bash or .zshenv for ZSH). -case $SHELL in -*/zsh) - PROFILE="${ZDOTDIR-"$HOME"}/.zshenv" - PREF_SHELL=zsh - ;; -*/bash) - PROFILE=$HOME/.bashrc - PREF_SHELL=bash - ;; -*/fish) - PROFILE=$HOME/.config/fish/config.fish - PREF_SHELL=fish - ;; -*/ash) - PROFILE=$HOME/.profile - PREF_SHELL=ash - ;; -*) - echo "foundryup-zksync: could not detect shell, manually add ${FOUNDRY_BIN_DIR} to your PATH." - exit 1 -esac - -# Only add foundryup-zksync if it isn't already in PATH. -if [[ ":$PATH:" != *":${FOUNDRY_BIN_DIR}:"* ]]; then - # Add the foundryup directory to the path and ensure the old PATH variables remain. - # If the shell is fish, echo fish_add_path instead of export. - if [[ "$PREF_SHELL" == "fish" ]]; then - echo >> "$PROFILE" && echo "fish_add_path -a $FOUNDRY_BIN_DIR" >> "$PROFILE" - else - echo >> "$PROFILE" && echo "export PATH=\"\$PATH:$FOUNDRY_BIN_DIR\"" >> "$PROFILE" - fi -fi - -# Warn MacOS users that they may need to manually install libusb via Homebrew: -if [[ "$OSTYPE" =~ ^darwin ]] && [[ ! -f /usr/local/opt/libusb/lib/libusb-1.0.0.dylib && ! -f /opt/homebrew/opt/libusb/lib/libusb-1.0.0.dylib ]]; then - echo && echo "warning: libusb not found. You may need to install it manually on MacOS via Homebrew (brew install libusb)." -fi - -echo -echo "Detected your preferred shell is $PREF_SHELL and added foundryup-zksync to PATH." -echo "Run 'source $PROFILE' or start a new terminal session to use foundryup-zksync." -echo "Then, simply run 'foundryup-zksync' to install foundry-zksync."