File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 22
33set -e -u
44IFS=$' \n '
5+ renice -n 19 $$ & > /dev/null
56
6- GZIP=gzip
7- [ -n " $( command -v pigz) " ] && GZIP=pigz
7+ GZIP=(gzip --best)
8+ [ -n " $( command -v pigz) " ] && {
9+ GZIP=(pigz --best)
10+ [ $( nproc) -ge 8 ] && GZIP=(pigz -11)
11+ }
812
913[ -n " $( git status --porcelain) " ] && CHANGES=" +" || CHANGES=" -"
1014VERSIONCODE=$( git rev-list --count HEAD)
@@ -19,15 +23,15 @@ declare -x VERSION VERSIONCODE REPACKAGEDSTRING
1923envsubst < module.prop > magiskmodule/module.prop &
2024
2125OUTPUT_FILE=" ViPER4AndroidFX-$REPACKAGEDSTRING$CHANGES$COMMITHASH .zip"
22- rm ViPER4AndroidFX-repackaged* .zip & > /dev/null || true
26+ rm -f ViPER4AndroidFX-repackaged* .zip
2327
2428compressFiles () {
2529 local files=" $( basename " $1 " ) "
2630 local folder=" $( dirname " $1 " ) "
2731 local targetarchive=" $2 "
2832 (
2933 cd " $folder "
30- tar -cf- $files | $ GZIP --best > " ../$targetarchive "
34+ tar -cf- $files | " ${ GZIP[@]} " > " ../$targetarchive "
3135 )
3236}
3337
You can’t perform that action at this time.
0 commit comments