From 04ed33a4e2cb7e77f1d72951ca468aef43f77a71 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Wed, 23 Apr 2025 14:29:10 -0400 Subject: [PATCH] Added method for installing packages from urls. --- .includes/functions.sh | 12 ++++++++++++ .includes/gui.sh | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.includes/functions.sh b/.includes/functions.sh index d71f247..77277f3 100755 --- a/.includes/functions.sh +++ b/.includes/functions.sh @@ -5,6 +5,18 @@ install_package() { yay --sudoflags "${sudoFlags[@]}" --sudoloop --needed --noconfirm -Sy "$@" } +url_install() { + local url="$1" + local tmpfile + tmpfile=$(mktemp /tmp/pkg.XXXXXX.pkg.tar.xz) + # Make sure system is up to date + yay --sudoflags "${sudoFlags[@]}" --sudoloop --noconfirm -Syu + if curl -fL --retry 10 -o "$tmpfile" "$url"; then + yay --sudoflags "${sudoFlags[@]}" --sudoloop --noconfirm -U "$tmpfile" + fi + rm -f "$tmpfile" +} + restart() { if dialog --clear --backtitle "Stormux" --yesno "Would you like to reboot now to apply changes?" 10 80 ; then sudo "${sudoFlags[@]}" reboot diff --git a/.includes/gui.sh b/.includes/gui.sh index d051007..df8f994 100755 --- a/.includes/gui.sh +++ b/.includes/gui.sh @@ -23,7 +23,7 @@ fi # replace xf86-video-dummy with xf86-video-dummy-with-vt yay --noconfirm -Rdd xf86-video-dummy -yay --noconfirm -Sy --needed xf86-video-dummy-with-vt --mflags --skippgpcheck +url_install 'https://stormux.org/packages/xf86-video-dummy-with-vt-0.4.1-1-aarch64.pkg.tar.xz' # Configure nodm sudo sed -i "s/{user}/$USER/g" /etc/nodm.conf