add ,xz parallel compressor
This commit is contained in:
@@ -12,23 +12,33 @@ pkgs.symlinkJoin {
|
|||||||
runtimeInputs = [ pkgs.jq ];
|
runtimeInputs = [ pkgs.jq ];
|
||||||
text = builtins.readFile ./jq_reformat.sh;
|
text = builtins.readFile ./jq_reformat.sh;
|
||||||
})
|
})
|
||||||
|
|
||||||
(pkgs.writers.writePython3Bin ",rename_lower" {
|
(pkgs.writers.writePython3Bin ",rename_lower" {
|
||||||
libraries = [ ];
|
libraries = [ ];
|
||||||
} (builtins.readFile ./rename_lower.py))
|
} (builtins.readFile ./rename_lower.py))
|
||||||
|
|
||||||
(pkgs.writeShellApplication {
|
(pkgs.writeShellApplication {
|
||||||
name = ",zipdir";
|
name = ",zipdir";
|
||||||
runtimeInputs = [ pkgs.zip ];
|
runtimeInputs = [ pkgs.zip ];
|
||||||
text = builtins.readFile ./zipdir;
|
text = builtins.readFile ./zipdir;
|
||||||
})
|
})
|
||||||
|
|
||||||
(pkgs.writeShellApplication {
|
(pkgs.writeShellApplication {
|
||||||
name = ",split-1G";
|
name = ",split-1G";
|
||||||
runtimeInputs = [ pkgs.coreutils ];
|
runtimeInputs = [ pkgs.coreutils ];
|
||||||
text = builtins.readFile ./split-1G;
|
text = builtins.readFile ./split-1G;
|
||||||
})
|
})
|
||||||
|
|
||||||
(pkgs.writeShellApplication {
|
(pkgs.writeShellApplication {
|
||||||
name = ",pushover-send";
|
name = ",pushover-send";
|
||||||
runtimeInputs = [ pkgs.curl ];
|
runtimeInputs = [ pkgs.curl ];
|
||||||
text = builtins.readFile ./pushover-send;
|
text = builtins.readFile ./pushover-send;
|
||||||
})
|
})
|
||||||
|
|
||||||
|
(pkgs.writeShellApplication {
|
||||||
|
name = ",xz";
|
||||||
|
runtimeInputs = [ pkgs.xz ];
|
||||||
|
text = builtins.readFile ./xz;
|
||||||
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
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