Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion l1-contracts/scripts/install_foundry.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -eu

export FOUNDRY_DIR="$PWD/.foundry"
Expand All @@ -7,6 +7,14 @@ BIN_URL="https://raw.githubusercontent.com/foundry-rs/foundry/master/foundryup/f
BIN_PATH="$FOUNDRY_BIN_DIR/foundryup"
FOUNDRY_MAN_DIR="$FOUNDRY_DIR/share/man/man1"
FOUNDRY_VERSION="nightly-de33b6af53005037b463318d2628b5cfcaf39916"
FOUNDRY_SHORT_VERSION=$(echo "${FOUNDRY_VERSION#*-}" | cut -c1-6)
echo "$FOUNDRY_SHORT_VERSION"

# Check if forge is installed and matches the expected version
if command -v "forge" > /dev/null 2>&1 && [[ "$(forge --version)" == *"$FOUNDRY_SHORT_VERSION"* ]]; then
echo "Foundry is already installed and at the correct version."
exit 0
fi

# Clean
rm -rf $FOUNDRY_DIR
Expand Down