File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -332,15 +332,30 @@ function get_version() {
332332 fi
333333}
334334
335+ function check_cursor_versions() {
336+ local stable_info=$( get_download_info " stable" )
337+ local stable_version=$( echo " $stable_info " | grep " VERSION=" | sed ' s/^VERSION=//' )
338+ local latest_info=$( get_download_info " latest" )
339+ local latest_version=$( echo " $latest_info " | grep " VERSION=" | sed ' s/^VERSION=//' )
340+ echo " Stable Version: $stable_version "
341+ echo " Latest Version: $latest_version "
342+ echo " --------------------------------"
343+ get_version
344+ return 0
345+ }
346+
335347# Parse command-line arguments
336348if [ " $1 " == " --version" ] || [ " $1 " == " -v" ]; then
337349 get_version
338350 exit $?
339- elif [ " $1 " == " --update" ]; then
351+ elif [ " $1 " == " --check" ] || [ " $1 " == " -c" ]; then
352+ check_cursor_versions
353+ elif [ " $1 " == " --update" ] || [ " $1 " == " -u" ]; then
340354 update_cursor " $2 "
341355elif [ " $1 " == " --help" ] || [ " $1 " == " -h" ]; then
342- echo " Usage: cursor [--update <stable|latest> | --version]"
343- echo " --update: Update Cursor to the specified version"
356+ echo " Usage: cursor [--check | --update <stable|latest> | --version]"
357+ echo " --check, -c: Show the stable and latest version of Cursor available for download"
358+ echo " --update, -u: Update Cursor to the specified version"
344359 echo " --version, -v: Show the installed version of Cursor"
345360 exit 0
346361else
You can’t perform that action at this time.
0 commit comments