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

Improve installation: Use /usr/local/bin & simplify manual install #21

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ShivangSrivastava
Copy link

@ShivangSrivastava ShivangSrivastava commented Feb 2, 2025

Description:

This PR improves the installation process by:

  1. Using /usr/local/bin instead of /usr/bin

    • /usr/local/bin is the recommended location for user-installed binaries.
    • Avoids potential conflicts with system-managed packages.
  2. Simplifying manual installation in the README

    • Instead of manually cloning, navigating, and running chmod +x, users can now install with a single command:
      curl -sL https://raw.githubusercontent.com/orhnk/RASCII/refs/heads/master/install.sh | sh
    • This makes installation faster and easier for users.

These changes follow best practices and improve the user experience.

Summary by Sourcery

Update the installation script to install the binary to /usr/local/bin instead of /usr/bin. Simplify the manual installation instructions in the README to a single command.

Enhancements:

  • Use /usr/local/bin for binary installation, which is the standard location for user-installed executables and prevents conflicts with system packages.
  • Simplify manual installation with a single curl command that clones the repository, builds the binary, and installs it.

Verified

This commit was signed with the committer’s verified signature. The key has expired.
rye Kris Rye
Copy link

sourcery-ai bot commented Feb 2, 2025

Reviewer's Guide by Sourcery

This pull request improves the installation process by changing the installation path to /usr/local/bin and simplifying the manual installation process in the README.

Sequence diagram for the new installation process

Loading
sequenceDiagram
    actor User
    participant Shell
    participant GitHub
    participant System

    User->>Shell: Run install command
    Shell->>GitHub: curl installation script
    GitHub-->>Shell: Return install.sh
    Shell->>Shell: Execute install.sh
    Shell->>GitHub: git clone RASCII
    GitHub-->>Shell: Return repository
    Shell->>Shell: Build with cargo
    Shell->>System: Copy binary to /usr/local/bin
    System-->>User: Installation complete

File-Level Changes

Change Details Files
The installation path has been changed from /usr/bin to /usr/local/bin.
  • The install script now copies the binary to /usr/local/bin instead of /usr/bin.
install.sh
The manual installation instructions in the README have been simplified.
  • The README now instructs users to install the application using a single curl command that pipes to sh.
README.md
The install script now clones the repository and changes the directory to the cloned repository.
  • The install script now clones the repository using git clone.
  • The install script now changes the directory to the cloned repository using cd RASCII.
install.sh

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @ShivangSrivastava - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Using curl | sh for installation is a security risk - users should be encouraged to download and inspect the installation script before running it. Consider providing the manual installation steps alongside a downloadable script.
  • The installation script assumes the RASCII directory doesn't exist and could fail if it does. Please add appropriate error checking and directory handling.
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@orhnk
Copy link
Owner

orhnk commented Feb 12, 2025

Thanks for the PR. Could you implement the suggested improvements please?

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants