This commit is contained in:
2025-09-11 17:18:20 -04:00
parent 7c9858f113
commit 2702b9f736
7 changed files with 4 additions and 3 deletions

25
local/.local/bin/pkg-install Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/sh
pkgs="$@"
installer="echo \"error: something went wrong\" ; exit 1"
check() {
command -v "$1" >/dev/null 2>&1
}
if check xbps-install; then
installer="sudo xbps-install -Syu"
elif check pacman; then
installer="sudo pacman -Syu"
elif check apt; then
installer="sudo apt install -y"
elif check dnf; then
installer="sudo dnf install -y"
elif check brew; then
installer="brew install"
else
echo "error: could not find package manager." ; exit 1
fi
$installer $pkgs && echo "done." && exit 0
exit 1