yadm-config/.config/yadm/bootstrap.v2/functions/pkg.sh
2025-04-21 22:19:46 +02:00

29 lines
555 B
Bash

#!/bin/env sh
installPackages() {
packages=$@
if command -v yay >/dev/null; then
echo " using yay"
yay -S --needed $packages
elif command -v apt >/dev/null; then
echo " using apt"
apt install $packages
else
echo "... no supported package manager found. exiting"
exit 1
fi
}
updateSystem() {
if command -v yay >/dev/null; then
echo " using yay"
yay
elif command -v apt >/dev/null; then
echo " using apt"
apt update
else
echo "... no supported package manager found. exiting"
exit 1
fi
}