Merge pull request #38 from NightmistTheCat/main

Add Void Linux XBPS support for Full System Update
This commit is contained in:
Chris Titus 2024-07-18 22:39:34 -05:00 committed by GitHub
commit 7a6afb24d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,7 +19,7 @@ checkEnv() {
fi fi
done done
## Check Package Handler ## Check Package Handler
PACKAGEMANAGER='apt-get nala dnf pacman zypper yum' PACKAGEMANAGER='apt-get nala dnf pacman zypper yum xbps-install'
for pgm in ${PACKAGEMANAGER}; do for pgm in ${PACKAGEMANAGER}; do
if command_exists ${pgm}; then if command_exists ${pgm}; then
PACKAGER=${pgm} PACKAGER=${pgm}
@ -111,6 +111,9 @@ fastUpdate() {
sudo ${PACKAGER} update -y sudo ${PACKAGER} update -y
sudo ${PACKAGER} upgrade -y sudo ${PACKAGER} upgrade -y
;; ;;
xbps-install)
sudo ${PACKAGER} -Syu
;;
*) *)
echo -e "${RED}Unsupported package manager: $PACKAGER${RC}" echo -e "${RED}Unsupported package manager: $PACKAGER${RC}"
exit 1 exit 1
@ -136,6 +139,9 @@ updateSystem() {
sudo ${PACKAGER} ref sudo ${PACKAGER} ref
sudo ${PACKAGER} --non-interactive dup sudo ${PACKAGER} --non-interactive dup
;; ;;
xbps-install)
sudo ${PACKAGER} -Syu
;;
*) *)
echo -e "${RED}Unsupported package manager: ${PACKAGER}${RC}" echo -e "${RED}Unsupported package manager: ${PACKAGER}${RC}"
exit 1 exit 1
@ -145,4 +151,4 @@ updateSystem() {
checkEnv checkEnv
fastUpdate fastUpdate
updateSystem updateSystem