-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Added one line command to get binary in linux #1609
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
Conversation
Added one line command to get binary in linux operating system.
WalkthroughThe README file was updated to include a new shell command for Linux users to download and extract the latest Changes
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
README.md (2)
119-119: Nit: improve sentence formatting
Capitalize “Linux”, add a comma and hyphenate “one-line” for clarity. For example:-To get `linux` binary use this one line command +To get the `Linux` binary, use this one-line command:
120-122: Enhance download command robustness
The current one-liner is brittle: it lacks HTTP-error checking (-f), relies ongrep/awkfor JSON parsing, and assumesunzip(and optionallyjq) is installed. Consider an optional refactor to improve reliability and readability:- ```sh - curl -sL -o subfinder.zip $(curl -sL "https://api.github.com/repos/projectdiscovery/subfinder/releases/latest" | grep "download_url" | grep "linux_$([ "$(uname -m)" = "x86_64" ] && echo "amd64" || uname -m)" | awk -F'"' '{ print $4 }') && unzip -q ./subfinder.zip && rm ./subfinder.zip - ``` + ```sh + # Map architecture + ARCH=$(uname -m); [ "$ARCH" = "x86_64" ] && ARCH=amd64 + # Fetch download URL via jq (if installed) + URL=$(curl -sSL "https://api.github.com/repos/projectdiscovery/subfinder/releases/latest" \ + | jq -r --arg ARCH "$ARCH" '.assets[] | select(.browser_download_url | contains("linux_\($ARCH)")) | .browser_download_url') + # Download and extract with HTTP-error checking + curl -sSLf -o subfinder.zip "$URL" + unzip -q subfinder.zip && rm subfinder.zip + ```This adds fail-on-error flags, robust JSON parsing, and explicit architecture handling.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
README.md(1 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md
[uncategorized] ~119-~119: Possible missing comma found.
Context: ...cmd/subfinder@latest To get `linux` binary use this one line commandsh curl -s...
(AI_HYDRA_LEO_MISSING_COMMA)
|
Thanks for the PR! The command is neat, but we try to keep the README simple and beginner-friendly. For installing and managing PD tools, we recommend using pdtm. If you'd like to contribute alternative installation methods, feel free to open a pull request at projectdiscovery/docs. That'd be a great place to expand on them. |
Added one line command to get binary in linux operating system.
Summary by CodeRabbit