Skip to content

Conversation

umarijaz04
Copy link

@umarijaz04 umarijaz04 commented May 21, 2025

This pull request updates the cursor_setup.sh script to enhance its robustness, improve version extraction, and address edge cases in handling the download URL and file metadata. The key changes include updating URLs and timeout values, refining version extraction logic, and improving fallback mechanisms for remote version and filename retrieval.

Updates to constants and configuration:

  • Updated DOWNLOAD_URL to a more specific production URL and increased the VERSION_CHECK_TIMEOUT from 5 seconds to 360 seconds to accommodate slower connections.

Improvements to version extraction:

  • Enhanced the extract_version function to handle variations in filename patterns (e.g., "Cursor-0.49.6" or "cursor_0.49.6") and added a fallback to a default version ("0.49.6") if no version is found.

Enhancements to remote version and filename handling:

  • Updated fetch_remote_version to extract the filename directly from the DOWNLOAD_URL if HTTP headers do not provide it, and added a fallback to use the basename of the DOWNLOAD_URL when filename information is missing.
  • Adjusted the find_local_version function to search for files with a more consistent naming pattern (Cursor-*.AppImage instead of cursor-*.AppImage).

Updated the download URL with the current cursor AppImage and changed the flow to retrieve the version, among other enhancements.
@umarijaz04 umarijaz04 changed the title Update cursor_setup.sh Feat: improve robustness of version extraction and update download URL May 21, 2025
@Vincent14
Copy link

You could even rely on https://github.com/oslook/cursor-ai-downloads @umarijaz04

@Vincent14
Copy link

With your changes I got

 ▶  Looking for the latest version online...
 ✔  Latest version details retrieved successfully.
Error: No version found in filename

@umarijaz04
Copy link
Author

umarijaz04 commented May 22, 2025

@Vincent14, https://github.com/oslook/cursor-ai-downloads, I have tried this before, and it is not running on Ubuntu 24.04.2 LTS. It only runs with the no-sandbox flag, which doesn't even connect the accounts.

@Vincent14, it works on my end, and I have changed the cursor URL to the latest version. Please see the screenshot below.

2025-05-22_18-39

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.

2 participants