build-usb: count PPKGs/wheels/debs through symlinked payload dirs

This commit is contained in:
cproudlock
2026-10-15 11:04:41 -04:00
parent 2717439690
commit 24c41d7e87

View File

@@ -505,7 +505,7 @@ t_cp packages "$OFFLINE_PKG_DIR/Packages" "$OFFLINE_PKG_DIR/explicit.list"
DEB_COUNT=0 DEB_COUNT=0
if compgen -G "$OFFLINE_PKG_DIR/*.deb" >/dev/null; then if compgen -G "$OFFLINE_PKG_DIR/*.deb" >/dev/null; then
t_cp packages "$OFFLINE_PKG_DIR"/*.deb t_cp packages "$OFFLINE_PKG_DIR"/*.deb
DEB_COUNT=$(find "$OFFLINE_PKG_DIR" -maxdepth 1 -name '*.deb' | wc -l) DEB_COUNT=$(find -L "$OFFLINE_PKG_DIR" -maxdepth 1 -name '*.deb' | wc -l)
fi fi
t_cp "" "$REPO_ROOT/scripts/offline-apt-install.sh" t_cp "" "$REPO_ROOT/scripts/offline-apt-install.sh"
echo " Copied $DEB_COUNT .deb packages + Packages + explicit.list to packages/" echo " Copied $DEB_COUNT .deb packages + Packages + explicit.list to packages/"
@@ -551,7 +551,7 @@ if [ ! -d "$PIP_WHEELS_DIR" ]; then
fi fi
if [ -d "$PIP_WHEELS_DIR" ]; then if [ -d "$PIP_WHEELS_DIR" ]; then
t_cp "" "$PIP_WHEELS_DIR" t_cp "" "$PIP_WHEELS_DIR"
WHEEL_COUNT=$(find "$PIP_WHEELS_DIR" -name '*.whl' | wc -l) WHEEL_COUNT=$(find -L "$PIP_WHEELS_DIR" -name '*.whl' | wc -l)
echo " Copied pip-wheels/ ($WHEEL_COUNT wheels)" echo " Copied pip-wheels/ ($WHEEL_COUNT wheels)"
fi fi
@@ -594,7 +594,7 @@ if [ -n "$ENROLLMENT_DIR" ] && [ -d "$ENROLLMENT_DIR" ]; then
t_cp enrollment "$f" t_cp enrollment "$f"
fi fi
done done
PPKG_COUNT=$(find "$ENROLLMENT_DIR" -maxdepth 1 -name '*.ppkg' 2>/dev/null | wc -l) PPKG_COUNT=$(find -L "$ENROLLMENT_DIR" -maxdepth 1 -name '*.ppkg' 2>/dev/null | wc -l)
ENROLL_SIZE=$(du -shL "$ENROLLMENT_DIR" | cut -f1) ENROLL_SIZE=$(du -shL "$ENROLLMENT_DIR" | cut -f1)
echo " Copied enrollment/ ($ENROLL_SIZE, $PPKG_COUNT PPKGs, $SPLIT_COUNT split)" echo " Copied enrollment/ ($ENROLL_SIZE, $PPKG_COUNT PPKGs, $SPLIT_COUNT split)"
elif [ -z "$ENROLLMENT_DIR" ]; then elif [ -z "$ENROLLMENT_DIR" ]; then
@@ -608,7 +608,7 @@ if [ -n "$BIOS_DIR" ] && [ -d "$BIOS_DIR" ] && [ "$(ls -A "$BIOS_DIR" 2>/dev/nul
echo " Copying BIOS update binaries from bios-staging/..." echo " Copying BIOS update binaries from bios-staging/..."
t_mkdir bios t_mkdir bios
t_cp bios "$BIOS_DIR"/* || true t_cp bios "$BIOS_DIR"/* || true
BIOS_COUNT=$(find "$BIOS_DIR" -name '*.exe' 2>/dev/null | wc -l) BIOS_COUNT=$(find -L "$BIOS_DIR" -name '*.exe' 2>/dev/null | wc -l)
BIOS_SIZE=$(du -shL "$BIOS_DIR" | cut -f1) BIOS_SIZE=$(du -shL "$BIOS_DIR" | cut -f1)
echo " Copied bios/ ($BIOS_SIZE, $BIOS_COUNT files)" echo " Copied bios/ ($BIOS_SIZE, $BIOS_COUNT files)"
elif [ -z "$BIOS_DIR" ]; then elif [ -z "$BIOS_DIR" ]; then