Stow scripts

This commit is contained in:
2023-11-25 09:35:34 -05:00
parent 547eb10705
commit b41a4141f2
41 changed files with 2 additions and 2 deletions

57
scripts/bin/update.sh Executable file
View File

@ -0,0 +1,57 @@
#! /bin/bash
# This script is a catch all program updater.
# DNF Updater
function dnfUpdate {
if command -v dnf &> /dev/null; then
echo Updating DNF...
sudo dnf update #--exclude=wine*
fi
}
# Apt Updater
function aptUpdate {
if command -v apt &> /dev/null; then
echo Updating APT...
sudo apt update
sudo apt upgrade
fi
}
# Flatpack Updater
function flatpakUpdate {
if command -v flatpak &> /dev/null; then
echo Updating Flatpak...
flatpak uninstall --unused
flatpak update
fi
}
# Checks if a program is installed and if it is runs an updater script
function updateProgram {
if command -v $1 &> /dev/null; then
sh $2
fi
}
# Manually installed programs updater
function manualUpdate {
if command -v dnf &> /dev/null; then
echo Updating manually installed programs...
updateProgram bitwig-studio ~/.config/scripts/installers/bitwig-install.sh &
updateProgram /opt/dragonframe5/bin/Dragonframe ~/.config/scripts/installers/dragonframe-install.sh &
updateProgram reaper ~/.config/scripts/installers/reaper-install.sh &
updateProgram /opt/resolve/bin/resolve ~/.config/scripts/installers/resolve-install.sh &
updateProgram /opt/keeweb/keeweb ~/.config/scripts/installers/keeweb-install.sh &
updateProgram yabridgectl ~/.config/scripts/installers/yabridge-install.sh &
wait
fi
}
dnfUpdate
aptUpdate
echo ''
flatpakUpdate
echo ''
manualUpdate