Skip to content

Install rsync in ct/commafeed.sh #4086

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

Merged
merged 2 commits into from
Apr 28, 2025

Conversation

mzhaodev
Copy link
Contributor

@mzhaodev mzhaodev commented Apr 28, 2025

✍️ Description

This PR installs rsync in the update script of commafeed for users who used the install script before rsync was added. This prevents users from seeing a command not found error when attempting to upgrade commafeed.

🔗 Related PR / Issue

✅ Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

This commit installs rsync in the update script of commafeed for users who used the install script before rsync was added.
@mzhaodev mzhaodev requested a review from a team as a code owner April 28, 2025 02:04
@github-actions github-actions bot added bugfix update script A change that updates a script labels Apr 28, 2025
@tremor021
Copy link
Member

tremor021 commented Apr 28, 2025

You should check if rsync is installed and install if needed only. The way you have it, it will always try to install it, use this instead:

if ! [[ $(dpkg -s rsync 2>/dev/null) ]]; then
    $STD apt-get update
    $STD apt-get install -y rsync
  fi

@mzhaodev
Copy link
Contributor Author

My understanding is that apt-get would only install rsync if it is out-of-date, in which case I don't think it's terrible to upgrade it. Regardless, I have added the check.

@tremor021 tremor021 merged commit 129698d into community-scripts:main Apr 28, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix refactor update script A change that updates a script
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants