'Generic Commit'
All checks were successful
dropshell-build / build (push) Successful in 4m49s

This commit is contained in:
Your Name 2025-06-02 00:45:42 +12:00
parent 2ddc5fa9b0
commit 2d62d7af7f
2 changed files with 26 additions and 4 deletions

View File

@ -35,6 +35,11 @@ function version() {
echo "2025.0531.0942"
}
function die() {
echo "Error: $*"
exit 1
}
# ----------------------------------------------------------------------------------------------------------
# BUILD

View File

@ -77,14 +77,32 @@ function install_packages() {
# Define packages based on distribution
case $OS in
"Ubuntu"|"Debian GNU/Linux")
"Ubuntu")
# Common packages for both Ubuntu and Debian
PACKAGES="build-essential cmake git wget tar curl ninja-build mold nodejs npm perl jq ccache upx-ucl"
PACKAGES="build-essential cmake git wget tar curl ninja-build mold nodejs npm perl jq ccache upx-ucl nlohmann-json3-dev"
INSTALLCMD="apt-get install -y"
UPDATECMD="apt-get update"
;;
"Debian GNU/Linux")
PACKAGES="build-essential cmake git wget tar curl ninja-build mold nodejs npm perl jq ccache upx-ucl nlohmann-json3-dev"
INSTALLCMD="apt-get install -y"
UPDATECMD="apt-get update"
# special case for debian 12
if ! is_package_installed "upx-ucl"; then
# get from testing.
# Add testing repo temporarily
echo "deb http://deb.debian.org/debian testing main" | ${SUDOCMD:-} tee /etc/apt/sources.list.d/testing-temp.list
# Update package lists
${SUDOCMD:-} bash -c "apt-get update"
${SUDOCMD:-} bash -c "apt-get -t testing install -y upx-ucl"
${SUDOCMD:-} bash -c "rm /etc/apt/sources.list.d/testing-temp.list"
${SUDOCMD:-} bash -c "apt-get update"
HAVE_UPDATED=1
fi
;;
"Alpine Linux")
PACKAGES="build-base cmake git wget tar curl ninja mold nodejs npm linux-headers perl jq ccache upx"
PACKAGES="build-base cmake git wget tar curl ninja mold nodejs npm linux-headers perl jq ccache upx nlohmann-json-dev"
INSTALLCMD="apk add --no-cache"
UPDATECMD="apk update"
;;
@ -304,7 +322,6 @@ function install_musl() {
TOOLCHAIN_LIST=(
"aarch64-linux-musl-cross"
"x86_64-linux-musl-cross"
"x86_64-w64-mingw32-cross"
)
for TOOLCHAIN in "${TOOLCHAIN_LIST[@]}"; do