From 1800574bd804dc75a5e3af5217d68d3a1a1fd951 Mon Sep 17 00:00:00 2001 From: Sussy Inc Date: Sun, 6 Aug 2023 15:11:05 -0400 Subject: [PATCH] Combine install-32 and install-64 as well as fix fuse implementation --- apps/Open-Typer/{install-32 => install} | 8 ++++++-- apps/Open-Typer/install-64 | 27 ------------------------- 2 files changed, 6 insertions(+), 29 deletions(-) rename apps/Open-Typer/{install-32 => install} (61%) delete mode 100755 apps/Open-Typer/install-64 diff --git a/apps/Open-Typer/install-32 b/apps/Open-Typer/install similarity index 61% rename from apps/Open-Typer/install-32 rename to apps/Open-Typer/install index 525008428e..b1807d780c 100755 --- a/apps/Open-Typer/install-32 +++ b/apps/Open-Typer/install @@ -3,10 +3,14 @@ version=5.2.0 #Install Depends -install_packages libfuse2 || exit 1 +enable_module fuse || exit 1 #Download Open-Typer build from repo -wget -O /tmp/Open-Typer.AppImage https://github.com/Open-Typer/Open-Typer/releases/download/v${version}/Open-Typer-armhf.AppImage || error "Failed to download AppImage!" +case "$arch" in + "64") wget -O /tmp/Open-Typer.AppImage https://github.com/Open-Typer/Open-Typer/releases/download/v${version}/Open-Typer-aarch64.AppImage || error "Failed to download AppImage!" ;; + "32") wget -O /tmp/Open-Typer.AppImage https://github.com/Open-Typer/Open-Typer/releases/download/v${version}/Open-Typer-armhf.AppImage || error "Failed to download AppImage!" ;; + *) error "arch variable is not set, can not continue" ;; +esac #Move Open-Typer.AppImage to /opt sudo mv /tmp/Open-Typer.AppImage /opt || error "Failed to move from /tmp to /opt!" diff --git a/apps/Open-Typer/install-64 b/apps/Open-Typer/install-64 deleted file mode 100755 index 3bd29a38a5..0000000000 --- a/apps/Open-Typer/install-64 +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -version=5.2.0 - -#Install Depends -install_packages libfuse2 || exit 1 - -#Download Open-Typer build from repo -wget -O /tmp/Open-Typer.AppImage https://github.com/Open-Typer/Open-Typer/releases/download/v${version}/Open-Typer-aarch64.AppImage || error "Failed to download AppImage!" - -#Move Open-Typer.AppImage to /opt -sudo mv /tmp/Open-Typer.AppImage /opt || error "Failed to move from /tmp to /opt!" - -#Mark Open-Typer.AppImage as executable -sudo chmod +x /opt/Open-Typer.AppImage || error "Failed to mark as executable!" - -#Create Menu Button -status "Creating Menu Button" -sudo mkdir -p /usr/local/share/applications -echo "[Desktop Entry] -Name=Open-Typer -Comment=A free and open source typing tutor program -Icon=$(dirname "$0")/icon-64.png -Exec=/opt/Open-Typer.AppImage %f -Type=Application -Terminal=false -Categories=Education;" | sudo tee /usr/local/share/applications/Open-Typer.desktop >/dev/null || error "Failed to create menu button!"