add ,xz parallel compressor
This commit is contained in:
13
pkgs/tb-scripts/xz
Executable file
13
pkgs/tb-scripts/xz
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh -x
|
||||
|
||||
PROCS=$(grep -c ^processor /proc/cpuinfo)
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
(for f in *; do
|
||||
echo "$f";
|
||||
done) | xargs -P"$PROCS" -d'\n' -n1 xz -9ve
|
||||
else
|
||||
(for f in "$@"; do
|
||||
echo "$f";
|
||||
done) | xargs -P"$PROCS" -d'\n' -n1 xz -9ve
|
||||
fi
|
||||
Reference in New Issue
Block a user