File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change 3535#
3636CURSOR_DIR=" $HOME /.local/share/cvm"
3737DOWNLOADS_DIR=" $CURSOR_DIR /app-images"
38- CVM_VERSION=" 1.1.1 "
38+ CVM_VERSION=" 1.1.2 "
3939
4040
4141
@@ -207,6 +207,27 @@ isShellSupported() {
207207 esac
208208}
209209
210+ cleanupAppImages () {
211+ for build_file in " $DOWNLOADS_DIR " /cursor-* -build-* -x86_64.AppImage; do
212+ # Skip if no files match the pattern
213+ [ -e " $build_file " ] || continue
214+
215+ # Extract version number from build file
216+ version=$( basename " $build_file " | sed -E ' s/cursor-([0-9.]+)-build.*/\1/' )
217+ regular_file=" $DOWNLOADS_DIR /cursor-$version .AppImage"
218+
219+ if [ -f " $regular_file " ]; then
220+ # If regular version exists, remove build version
221+ rm " $build_file "
222+ # echo "Removed build version for $version (regular version exists)"
223+ else
224+ # If only build version exists, rename it to regular format
225+ mv " $build_file " " $regular_file "
226+ # echo "Renamed build version to regular format for $version"
227+ fi
228+ done
229+ }
230+
210231
211232
212233#
222243
223244checkDependencies
224245mkdir -p " $DOWNLOADS_DIR "
246+ cleanupAppImages
225247
226248case " $1 " in
227249 --help|-h)
You can’t perform that action at this time.
0 commit comments