@@ -8,8 +8,46 @@ ICON=phoenix_icon.png
88GITHUB_REPO=" phcode-dev/phoenix-desktop"
99API_URL=" https://api.github.com/repos/$GITHUB_REPO /releases/latest"
1010ICON_URL=" https://updates.phcode.io/icons/phoenix_icon.png"
11+ check_and_install_libfuse () {
12+ # Identify the Linux distribution
13+ if [ -f /etc/os-release ]; then
14+ . /etc/os-release
15+ DISTRO=$ID
16+ else
17+ echo " Cannot identify the operating system."
18+ exit 1
19+ fi
20+
21+ echo " Checking for FUSE library..."
22+
23+ if [ " $DISTRO " = " ubuntu" ]; then
24+ # Check and install libfuse2 on Ubuntu
25+ if ! dpkg -s libfuse2 & > /dev/null; then
26+ echo " libfuse2 not found, installing..."
27+ sudo apt-get update && sudo apt-get install -y libfuse2 || { echo " Failed to install libfuse2" ; exit 1; }
28+ else
29+ echo " libfuse2 is already installed."
30+ fi
31+ elif [ " $DISTRO " = " fedora" ]; then
32+ # Check and install fuse-libs on Fedora
33+ if [ " $DISTRO " = " fedora" ]; then
34+ # Check and install fuse-libs on Fedora
35+ if ! rpm -q fuse-libs & > /dev/null; then
36+ echo " fuse-libs not found, installing..."
37+ sudo dnf install -y fuse-libs || { echo " Failed to install fuse-libs" ; exit 1; }
38+ else
39+ echo " fuse-libs is already installed."
40+ fi
41+ fi
42+
43+ else
44+ echo " Unsupported distribution: $DISTRO "
45+ exit 1
46+ fi
47+ }
1148
1249install () {
50+ check_and_install_libfuse
1351 # Fetch the latest release data from GitHub
1452 echo " Fetching latest release from $GITHUB_REPO ..."
1553 wget -qO- $API_URL > latest_release.json || { echo " Failed to fetch latest release info" ; exit 1; }
0 commit comments