Added method for installing packages from urls.

This commit is contained in:
Storm Dragon
2025-04-23 14:29:10 -04:00
parent a3c1aa3bf7
commit 04ed33a4e2
2 changed files with 13 additions and 1 deletions

View File

@ -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