Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use latest versions #45

Merged
merged 4 commits into from
Mar 20, 2024
Merged
Changes from 1 commit
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
13 changes: 7 additions & 6 deletions packer/provision.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

Check failure on line 1 in packer/provision.sh

View workflow job for this annotation

GitHub Actions / Trunk Check

shfmt

Incorrect formatting, autoformat by running 'trunk fmt'
# shellcheck source=/dev/null
set -e

Expand Down Expand Up @@ -31,13 +31,11 @@
python3 -m venv ~/venv
source ~/venv/bin/activate
pip3 install solc-select slither-analyzer crytic-compile
solc-select install 0.8.6
solc-select use 0.8.6
solc-select use latest --always-install
bohendo marked this conversation as resolved.
Show resolved Hide resolved

echo "Downloading echidna..."
curl -fsSL -o /tmp/echidna.zip https://github.com/crytic/echidna/releases/download/v2.2.1/echidna-2.2.1-Linux.zip
curl -fsSL https://github.com/crytic/echidna/releases/download/v2.2.3/echidna-2.2.3-x86_64-linux.tar.gz -o /tmp/echidna.tar.gz
echo "Extracting echidna..."
0xalpharush marked this conversation as resolved.
Show resolved Hide resolved
unzip /tmp/echidna.zip -d /tmp
tar -xzf /tmp/echidna.tar.gz -C /tmp
echo "Installing echidna..."
mv /tmp/echidna /usr/local/bin
Expand All @@ -46,10 +44,13 @@
echo "Downloading medusa..."
sudo apt-get update
sudo apt-get install -y unzip
0xalpharush marked this conversation as resolved.
Show resolved Hide resolved
curl -fsSL https://github.com/crytic/medusa/releases/download/v0.1.0/medusa-linux-x64.zip -o medusa.zip
unzip medusa.zip
curl -fsSL https://github.com/crytic/medusa/releases/download/v0.1.3/medusa-linux-x64.tar.gz -o /tmp/medusa.tar.gz
echo "Extracting medusa..."
tar -xzf /tmp/medusa.tar.gz -C /tmp
echo "Installing medusa..."
chmod +x medusa
sudo mv medusa /usr/local/bin
Copy link

@github-actions github-actions bot Mar 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image description CodeRabbit

Similar to the previous comment, the downloaded file /tmp/medusa.tar.gz is not being removed after extraction and installation. Also, the chmod +x medusa command seems to be executed in the wrong directory. It should be executed in the /tmp directory where the file was extracted.

  tar -xzf /tmp/medusa.tar.gz -C /tmp
  echo "Installing medusa..."
- chmod +x medusa
+ chmod +x /tmp/medusa
  sudo mv /tmp/medusa /usr/local/bin
+ rm /tmp/medusa.tar.gz

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the rm is here already as well 👀

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image description CodeRabbit

@elopez You're correct, my apologies for the oversight. The rm /tmp/medusa.tar.gz command is indeed present in the script to remove the downloaded tar file after extraction and installation. However, the correction for the chmod +x medusa command still stands. It should be executed in the /tmp directory where the file was extracted. Here's the corrected line:

- chmod +x medusa
+ chmod +x /tmp/medusa

Thank you for pointing out the mistake.

0xalpharush marked this conversation as resolved.
Show resolved Hide resolved
rm /tmp/medusa.tar.gz

echo "Installing docker and its dependencies..."
apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
Expand Down
Loading