From 64bdc653441ba0cb39e4087e584bf833aa0d9066 Mon Sep 17 00:00:00 2001 From: Mollusk Date: Thu, 29 Oct 2026 14:59:00 -0400 Subject: [PATCH] godfather.sh: fix flatpak/apt/xbps detection, replace Gradio with Shortwave Co-Authored-By: Claude Opus 5.5 --- godfather.sh | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/godfather.sh b/godfather.sh index 379038d..4905c75 100755 --- a/godfather.sh +++ b/godfather.sh @@ -5,24 +5,16 @@ appsDir="Apps" tuxcPath="tuxc/" -flatpakBin=$(which flatpak >/dev/null 2>&1) -checkApt=$(which apt >/dev/null 2>&1) -checkXbps=$(which xbps-install >/dev/null 2>&1) installFlatpak(){ - if [ ! ${flatpakBin} ];then - if [ ${checkXbps} ];then + if ! command -v flatpak >/dev/null 2>&1;then + if command -v xbps-install >/dev/null 2>&1;then sudo xbps-install -S flatpak - elif [ ${checkApt} ];then - printf "\nChecking for PPA\n" - if [ ! -f /etc/apt/sources.list.d/alexlarsson-ubuntu-flatpak-xenial.list ];then - printf "\nInstalling PPA\n" - sudo add-apt-repository ppa:alexlarsson/flatpak - sudo apt update - sudo apt install flatpak - else - sudo apt install flatpak - fi + elif command -v pacman >/dev/null 2>&1;then + sudo pacman -S --needed flatpak + + elif command -v apt >/dev/null 2>&1;then + sudo apt install flatpak else printf "\nUnsupported Operating System" fi @@ -33,7 +25,7 @@ installFlatpak(){ addFlatpakRepo(){ - if [ $(which flatpak) ];then + if command -v flatpak >/dev/null 2>&1;then printf "\nAdding Flathub Repository..\n" flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo else @@ -42,8 +34,8 @@ addFlatpakRepo(){ } getPackages(){ - printf "\nInstalling Gradio..\n" - flatpak install flathub de.haeckerfelix.gradio + printf "\nInstalling Shortwave..\n" + flatpak install flathub de.haeckerfelix.Shortwave printf "\nInstalling Adapta Theme...\n" flatpak install flathub org.gtk.Gtk3theme.Adapta-Nokto-Eta @@ -52,7 +44,7 @@ getPackages(){ getDevTools(){ - cd ${tuxcPath} + cd ${tuxcPath} || return sudo ./tuxc i go }