Skip to content

Add fuse #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion cursor_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -80,6 +80,16 @@ install_script_alias() {
check_and_install_dependencies() {
spinner "Checking dependencies..." "sleep 1"
local missing_packages=()

# Special handling for libfuse2 on Ubuntu 24.04+
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=""
Expand Down