'Generic Commit'
All checks were successful
Build-Test-Publish / build (push) Successful in 4s
dropshell-build / build (push) Successful in 2m2s

This commit is contained in:
Your Name 2025-06-01 14:00:28 +12:00
parent 401902ee05
commit b05f1d1ac9

View File

@ -35,53 +35,6 @@ function version() {
echo "2025.0531.0942"
}
# ----------------------------------------------------------------------------------------------------------
# CHECK PACKAGES
# ----------------------------------------------------------------------------------------------------------
OS=""
# Function to check if a package is installed
is_package_installed() {
if [ "$OS" = "Alpine Linux" ]; then
apk info | grep -q "^$1$"
else
dpkg -l "$1" 2>/dev/null 1>/dev/null
fi
}
function check_packages() {
if [ -f /etc/os-release ]; then
OS=$(source /etc/os-release && echo $NAME)
fi
[ -n "$OS" ] || die "Could not detect distribution (no /etc/os-release file?)"
# Define packages based on distribution
case $OS in
"Ubuntu"|"Debian GNU/Linux")
# Common packages for both Ubuntu and Debian
PACKAGES="build-essential cmake git wget tar curl ninja-build mold nodejs npm perl jq ccache"
;;
"Alpine Linux")
PACKAGES="build-base cmake git wget tar curl ninja mold nodejs npm linux-headers perl jq ccache"
;;
*)
echo "Unsupported distribution: $OS"
exit 1
;;
esac
echo "Checking required packages..."
for pkg in $PACKAGES; do
if ! is_package_installed "$pkg"; then
echo "Missing package: $pkg"
exit 1
fi
echo "Package $pkg is installed"
done
}
# ----------------------------------------------------------------------------------------------------------
# BUILD
@ -271,8 +224,6 @@ function buildspawn() {
# ----------------------------------------------------------------------------------------------------------
function main() {
check_packages
while getopts "rm" opt; do
case $opt in
r)