feat: Add pigz support for parallel archive decompression and update hanatool version to 1.5.9.
This commit is contained in:
14
hanatool.sh
14
hanatool.sh
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user