feat: Add pigz support for parallel archive decompression and update hanatool version to 1.5.9.

This commit is contained in:
2026-03-04 09:32:59 +01:00
parent d5531d9ca1
commit 2657766326
2 changed files with 12 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
#!/bin/bash
# Version: 1.5.8
# Version: 1.5.9
# Author: Tomi Eckert
# ==============================================================================
# SAP HANA Schema and Tenant Management Tool (hanatool.sh)
@@ -400,9 +400,17 @@ case "$ACTION" in
TAR_EXIT_CODE=0
if [[ "$DRY_RUN" == "true" ]]; then
echo "[DRY RUN] Would decompress archive: tar -xzf \"$SOURCE_PATH\" -C \"$IMPORT_DIR\" --strip-components=1"
if [[ "$USE_PIGZ" == "true" ]]; then
echo "[DRY RUN] Would decompress archive (pigz): tar -I \"pigz -p $THREADS\" -xf \"$SOURCE_PATH\" -C \"$IMPORT_DIR\" --strip-components=1"
else
echo "[DRY RUN] Would decompress archive: tar -xzf \"$SOURCE_PATH\" -C \"$IMPORT_DIR\" --strip-components=1"
fi
else
tar -xzf "$SOURCE_PATH" -C "$IMPORT_DIR" --strip-components=1
if [[ "$USE_PIGZ" == "true" ]]; then
tar -I "pigz -p $THREADS" -xf "$SOURCE_PATH" -C "$IMPORT_DIR" --strip-components=1
else
tar -xzf "$SOURCE_PATH" -C "$IMPORT_DIR" --strip-components=1
fi
TAR_EXIT_CODE=$?
fi