[PR #918] [MERGED] Fix Omada - Crawling latest version #2933

Closed
opened 2026-02-26 13:31:51 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE/pull/918
Author: @MickLesk
Created: 12/19/2024
Status: Merged
Merged: 12/19/2024
Merged by: @MickLesk

Base: mainHead: omada_fix


📝 Commits (3)

📊 Changes

2 files changed (+10 additions, -9 deletions)

View changed files

📝 ct/omada.sh (+3 -3)
📝 install/omada-install.sh (+7 -6)

📄 Description

✍️ Description

The script was always downloading the older version because the grep command was extracting all links containing linux_x64 in the HTML content. However, the extraction wasn't sorted, and the head -n1 command was picking the first match, which might not always be the latest version. Additionally, the HTML content could include multiple links with similar patterns, such as older versions or different file types (e.g., .tar.gz), causing the script to select the wrong one.

By adding a sort command, we ensured that the list of URLs was ordered, and then using tail -n 1 ensured the script always selects the most recent version, based on the sorted list.


  • Related Issue: #889

🛠️ Type of Change

Please check the relevant options:

  • Bug fix (non-breaking change that resolves an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change unexpectedly)
  • New script (a fully functional and thoroughly tested script or set of scripts)

Prerequisites

The following steps must be completed for the pull request to be considered:

  • Self-review performed (I have reviewed my code to ensure it follows established patterns and conventions.)
  • Testing performed (I have thoroughly tested my changes and verified expected functionality.)
  • Documentation updated (I have updated any relevant documentation)

📋 Additional Information (optional)

Provide any extra context or screenshots about the feature or fix here.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/community-scripts/ProxmoxVE/pull/918 **Author:** [@MickLesk](https://github.com/MickLesk) **Created:** 12/19/2024 **Status:** ✅ Merged **Merged:** 12/19/2024 **Merged by:** [@MickLesk](https://github.com/MickLesk) **Base:** `main` ← **Head:** `omada_fix` --- ### 📝 Commits (3) - [`08ea101`](https://github.com/community-scripts/ProxmoxVE/commit/08ea1010edb4468bb45aed540d77c49858c68a87) Fix Update Function Omada - [`cfd4619`](https://github.com/community-scripts/ProxmoxVE/commit/cfd4619b4152af710da900cb2f0c2ab907646fdf) Fix Omada Install Latest URL - [`e929220`](https://github.com/community-scripts/ProxmoxVE/commit/e929220535889900394c44a08cf4e02d3d28d5d6) Fix Dependencies ### 📊 Changes **2 files changed** (+10 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `ct/omada.sh` (+3 -3) 📝 `install/omada-install.sh` (+7 -6) </details> ### 📄 Description ## ✍️ Description The script was always downloading the older version because the grep command was extracting all links containing linux_x64 in the HTML content. However, the extraction wasn't sorted, and the head -n1 command was picking the first match, which might not always be the latest version. Additionally, the HTML content could include multiple links with similar patterns, such as older versions or different file types (e.g., .tar.gz), causing the script to select the wrong one. By adding a sort command, we ensured that the list of URLs was ordered, and then using tail -n 1 ensured the script always selects the most recent version, based on the sorted list. - - - - Related Issue: #889 --- ## 🛠️ Type of Change Please check the relevant options: - [x] Bug fix (non-breaking change that resolves an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change unexpectedly) - [ ] New script (a fully functional and thoroughly tested script or set of scripts) --- ## ✅ Prerequisites The following steps must be completed for the pull request to be considered: - [x] Self-review performed (I have reviewed my code to ensure it follows established patterns and conventions.) - [x] Testing performed (I have thoroughly tested my changes and verified expected functionality.) - [x] Documentation updated (I have updated any relevant documentation) --- ## 📋 Additional Information (optional) Provide any extra context or screenshots about the feature or fix here. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 13:31:51 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ProxmoxVE#2933
No description provided.