Files
PVE-Tools-9/build.sh
Maple d8b3d9fbdf feat: release v11.0.0 Liino — menu framework, risk guards, CI gates
Unify all menus on lib/menu.sh (run_menu), harden GPU/GRUB writes with
two-tier confirms and markers, fix remote/self-update to Releases assets,
and close real CI quality gates with SHA256SUMS. Bump to 11.0.0 / Liino.
2026-07-28 14:43:58 +08:00

50 lines
1.2 KiB
Bash

#!/bin/bash
# SPDX-License-Identifier: GPL-3.0-only
# Copyright (C) 2026 Ciriu Networks
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
OUTPUT="${1:-$ROOT/dist/PVE-Tools.sh}"
VERSION="$(cat "$ROOT/VERSION")"
mkdir -p "$(dirname "$OUTPUT")"
{
echo '#!/bin/bash'
echo
echo "# PVE-Tools Pro v$VERSION"
echo "# Build: $(date -u +%Y-%m-%dT%H:%M:%SZ)"
echo "# SPDX-License-Identifier: GPL-3.0-only"
echo "# Copyright (C) 2026 Ciriu Networks"
echo
for lib_name in config.sh core.sh menu.sh network.sh runtime.sh; do
lib_file="$ROOT/lib/$lib_name"
if [[ ! -f "$lib_file" ]]; then
echo "Missing lib file: $lib_file" >&2
exit 1
fi
echo "# [lib] $lib_name"
cat "$lib_file"
echo
done
while IFS= read -r -d '' module_file; do
rel="${module_file#$ROOT/src/modules/}"
echo "# [module] $rel"
cat "$module_file"
echo
done < <(find "$ROOT/src/modules" -name '*.sh' -print0 | sort -z)
echo 'main "$@"'
echo
} > "$OUTPUT"
chmod +x "$OUTPUT"
total_lines=$(wc -l < "$OUTPUT")
total_size=$(wc -c < "$OUTPUT")
echo "Built: $OUTPUT"
echo " Lines: $total_lines | Size: $(( total_size / 1024 ))KB"