diff options
Diffstat (limited to 'server/includes/packing.inc')
| -rw-r--r-- | server/includes/packing.inc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/server/includes/packing.inc b/server/includes/packing.inc index b94d06e8..d24c8e51 100644 --- a/server/includes/packing.inc +++ b/server/includes/packing.inc @@ -32,8 +32,17 @@ generate_squashfs() { if [ -n "$3" ]; then find "$3" -type f -o -type l | cut -c "$(( ${#3} + 2 ))-" > "$IGNORE" fi + # Detect mksquashfs xz support + local PARAMS + if mksquashfs 2>&1 | grep -A 8 '^-comp' | grep -q '\sxz'; then + pinfo "Using xz compression" + PARAMS="-comp xz" + else + pinfo "Using default compression" + PARAMS="" + fi rm -f -- "$2" - mksquashfs "$1" "$2" -ef "$IGNORE" -comp xz -b 1M -no-recovery >&6 \ + mksquashfs "$1" "$2" -ef "$IGNORE" $PARAMS -b 1M -no-recovery >&6 \ || perror "mksquashfs failed ($?)." pinfo "Created squashfs of $1 at $2" pinfo "Size: $(du -bsh "$2" | awk 'END {print $1}')" |
