Skip to content

Commit

Permalink
Fix binaries names
Browse files Browse the repository at this point in the history
  • Loading branch information
thepluck committed Feb 15, 2025
1 parent 4bd721a commit b3abf54
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
18 changes: 7 additions & 11 deletions foundryup-zksync/foundryup-zksync
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ main() {

for bin in "${BINS[@]}"; do
# Remove prior installations if they exist
rm -f "$FOUNDRY_BIN_DIR/$bin"
rm -f "$FOUNDRY_BIN_DIR/$bin-zksync"
# Symlink from local repo binaries to bin dir
ensure ln -s "$PWD/target/release/$bin" "$FOUNDRY_BIN_DIR/$bin"
ensure ln -s "$PWD/target/release/$bin" "$FOUNDRY_BIN_DIR/$bin-zksync"
done

say "done"
Expand Down Expand Up @@ -169,7 +169,7 @@ main() {
MAN_TARBALL_URL="${RELEASE_URL}foundry_zksync_man_${MAN_TAG}.tar.gz"

# Download and extract the binaries archive
say "downloading latest forge, and cast"
say "downloading latest forge-zksync, and cast-zksync"
if [ "$PLATFORM" = "win32" ]; then
tmp="$(mktemp -d 2>/dev/null || echo ".")/foundry-zksync.zip"
ensure download "$BIN_ARCHIVE_URL" "$tmp"
Expand All @@ -190,7 +190,7 @@ main() {
fi

for bin in "${BINS[@]}"; do
bin_path="$FOUNDRY_BIN_DIR/$bin"
bin_path="$FOUNDRY_BIN_DIR/$bin-zksync"
cp $FOUNDRY_VERSIONS_DIR/$ARCHIVE_TAG/$bin $bin_path

# Print installed msg
Expand Down Expand Up @@ -331,16 +331,12 @@ EOF
# If help2man is installed, use it to add Foundry man pages.
if check_cmd help2man; then
for bin in "${BINS[@]}"; do
help2man -N "$FOUNDRY_BIN_DIR/$bin" > "$FOUNDRY_MAN_DIR/$bin.1"
help2man -N "$FOUNDRY_BIN_DIR/$bin-zksync" > "$FOUNDRY_MAN_DIR/$bin-zksync.1"
done
fi

say "done"
fi

for bin in "${BINS[@]}"; do
mv "$FOUNDRY_BIN_DIR/$bin" "$FOUNDRY_BIN_DIR/$bin-zksync"
done
}

usage() {
Expand Down Expand Up @@ -404,7 +400,7 @@ list() {
done
else
for bin in "${BINS[@]}"; do
bin_path="$FOUNDRY_BIN_DIR/$bin"
bin_path="$FOUNDRY_BIN_DIR/$bin-zksync"
say "- $(ensure "$bin_path" -V)"
done
fi
Expand All @@ -419,7 +415,7 @@ use() {
check_bins_in_use

for bin in "${BINS[@]}"; do
bin_path="$FOUNDRY_BIN_DIR/$bin"
bin_path="$FOUNDRY_BIN_DIR/$bin-zksync"
cp $FOUNDRY_VERSION_DIR/$bin $bin_path
# Print usage msg
say "use - $(ensure "$bin_path" -V)"
Expand Down
2 changes: 1 addition & 1 deletion install-foundry-zksync
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ echo "Running the installation script..."
# Extract the exact path from the install.log
# Use sed to precisely capture the path after 'source' and before the next apostrophe
SHELL_CONFIG_FILE=$(sed -n "s/.*Run 'source \(.*\)'.*/\1/p" install.log)
FOUNDRY_BIN_DIR="${XDG_CONFIG_HOME:-$HOME}/.foundry/bin"
FOUNDRY_BIN_DIR="${XDG_CONFIG_HOME:-$HOME}/.foundry-zksync/bin"

if [ -n "$SHELL_CONFIG_FILE" ]; then
if [ -n "${CI}" ]; then
Expand Down

0 comments on commit b3abf54

Please sign in to comment.