From 07587f55711c8ba6ce984a029e554edb6502606b Mon Sep 17 00:00:00 2001 From: Andres Suarez <23503930+glicerico@users.noreply.github.com> Date: Thu, 23 Jan 2025 13:32:05 -0600 Subject: [PATCH 1/3] Include FUSE dependency --- cursor_setup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cursor_setup.sh b/cursor_setup.sh index 8a2bc8f..c3e5336 100755 --- a/cursor_setup.sh +++ b/cursor_setup.sh @@ -12,7 +12,7 @@ readonly ICON_URL="https://mintlify.s3-us-west-1.amazonaws.com/cursor/images/log readonly VERSION_CHECK_TIMEOUT=5 # in seconds | if you have a slow connection, increase this value to 10, 15, or more readonly SPINNERS=("meter" "line" "dot" "minidot" "jump" "pulse" "points" "globe" "moon" "monkey" "hamburger") readonly SPINNER="${SPINNERS[0]}" -readonly DEPENDENCIES=("gum" "curl" "wget" "pv" "bc" "find:findutils" "chmod:coreutils" "timeout:coreutils" "mkdir:coreutils" "apparmor_parser:apparmor-utils") +readonly DEPENDENCIES=("gum" "curl" "wget" "pv" "bc" "find:findutils" "chmod:coreutils" "timeout:coreutils" "mkdir:coreutils" "apparmor_parser:apparmor-utils" "libfuse2") readonly GUM_VERSION_REQUIRED="0.14.5" readonly SYSTEM_DESKTOP_FILE="$HOME/.local/share/applications/cursor.desktop" readonly APPARMOR_PROFILE="/etc/apparmor.d/cursor-appimage" @@ -80,6 +80,7 @@ install_script_alias() { check_and_install_dependencies() { spinner "Checking dependencies..." "sleep 1" local missing_packages=() + for dep_info in "${DEPENDENCIES[@]}"; do local dep="${dep_info%%:*}" package="${dep_info#*:}" [[ "$package" == "$dep" ]] && package="" From 201018b3c0ac1976d2c9b309f79fa0737415f4b3 Mon Sep 17 00:00:00 2001 From: Andres Suarez <23503930+glicerico@users.noreply.github.com> Date: Thu, 23 Jan 2025 13:33:21 -0600 Subject: [PATCH 2/3] Handle Ubuntu 24 specially --- cursor_setup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cursor_setup.sh b/cursor_setup.sh index c3e5336..dbf863e 100755 --- a/cursor_setup.sh +++ b/cursor_setup.sh @@ -80,9 +80,9 @@ install_script_alias() { check_and_install_dependencies() { spinner "Checking dependencies..." "sleep 1" local missing_packages=() - - for dep_info in "${DEPENDENCIES[@]}"; do - local dep="${dep_info%%:*}" package="${dep_info#*:}" + + # Special handling for libfuse2 on Ubuntu 24.04+ + if [[ -f "/etc/os-release" ]] && grep -q{dep_info#*:}" [[ "$package" == "$dep" ]] && package="" command -v "$dep" >/dev/null 2>&1 || missing_packages+=("${package:-$dep}") done From ffb0dea9623918ffab67e03b46fb90f26a18eea6 Mon Sep 17 00:00:00 2001 From: Andres Suarez <23503930+glicerico@users.noreply.github.com> Date: Thu, 23 Jan 2025 13:37:13 -0600 Subject: [PATCH 3/3] Handle Ubuntu 24 --- cursor_setup.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cursor_setup.sh b/cursor_setup.sh index dbf863e..2c18642 100755 --- a/cursor_setup.sh +++ b/cursor_setup.sh @@ -82,7 +82,16 @@ check_and_install_dependencies() { local missing_packages=() # Special handling for libfuse2 on Ubuntu 24.04+ - if [[ -f "/etc/os-release" ]] && grep -q{dep_info#*:}" + if [[ -f "/etc/os-release" ]] && grep -q "Ubuntu" "/etc/os-release"; then + local ubuntu_version=$(grep -oP 'VERSION_ID="\K[^"]+' /etc/os-release) + if (( $(echo "$ubuntu_version >= 24.04" | bc -l) )); then + # Replace libfuse2 with libfuse2t64 for Ubuntu 24.04+ + DEPENDENCIES=("${DEPENDENCIES[@]/libfuse2/libfuse2t64}") + fi + fi + + for dep_info in "${DEPENDENCIES[@]}"; do + local dep="${dep_info%%:*}" package="${dep_info#*:}" [[ "$package" == "$dep" ]] && package="" command -v "$dep" >/dev/null 2>&1 || missing_packages+=("${package:-$dep}") done