mirror of
https://github.com/deajan/obackup.git
synced 2024-12-26 07:23:41 +01:00
Another compression fix for busybox
This commit is contained in:
parent
4044ea6dbc
commit
b697c13c76
@ -1,6 +1,6 @@
|
||||
#### MINIMAL-FUNCTION-SET BEGIN ####
|
||||
|
||||
## FUNC_BUILD=2016102305
|
||||
## FUNC_BUILD=2016102306
|
||||
## BEGIN Generic bash functions written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
|
||||
|
||||
## To use in a program, define the following variables:
|
||||
@ -1485,12 +1485,20 @@ function PreInit {
|
||||
COMPRESSION_LEVEL=3
|
||||
fi
|
||||
|
||||
## Busybox fix (Termux xz command doesn't support compression level as example)
|
||||
## Busybox fix (Termux xz command doesn't support compression at all)
|
||||
if [ "$LOCAL_OS" == "BUSYBOX" ] || [ "$REMOTE_OS" == "BUSYBOX" ]; then
|
||||
compressionString=""
|
||||
if type gzip > /dev/null 2>&1
|
||||
then
|
||||
COMPRESSION_PROGRAM="| gzip -c$compressionString"
|
||||
COMPRESSION_EXTENSION=.gz
|
||||
# obackup specific
|
||||
else
|
||||
COMPRESSION_PROGRAM=
|
||||
COMPRESSION_EXTENSION=
|
||||
fi
|
||||
else
|
||||
compressionString=" -$COMPRESSION_LEVEL"
|
||||
fi
|
||||
|
||||
if type xz > /dev/null 2>&1
|
||||
then
|
||||
@ -1516,6 +1524,7 @@ function PreInit {
|
||||
COMPRESSION_PROGRAM=
|
||||
COMPRESSION_EXTENSION=
|
||||
fi
|
||||
fi
|
||||
ALERT_LOG_FILE="$ALERT_LOG_FILE$COMPRESSION_EXTENSION"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user