dot

packages and services management
Log | Files | Refs | README

commit 9ec77c7b89d66166b07c96160ae5007fac402d8c
parent 1f3b5896aa2de0fddf04f6ff0e85b3d24bd798d7
Author: Josuah Demangeon <mail@josuah.net>
Date:   Tue,  9 Jan 2018 22:37:29 +0100

compression with the faster lz4

Diffstat:
Mbin/back | 6+++---
Apack/liblz4/build | 5+++++
Apack/liblz4/git | 1+
3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/bin/back b/bin/back @@ -1,5 +1,5 @@ #!/bin/sh -e -# organize data for backup and sychronisation +# store data in hash-indexed lz4-compressed backups BACK="${BACK:-$HOME/back}" @@ -16,7 +16,7 @@ case $1 in -exec grep -F {} "$log" ';' -o \ -exec $sum {} + \ ')' | tee "$BACK/new" | while read -r hash path - do [ -f "$BACK/obj/$hash.xz" ] || xz -ck "$path" > "$BACK/obj/$hash.xz" + do [ -f "$BACK/obj/$hash.lz4" ] || lz4 "$path" "$BACK/obj/$hash.lz4" done sort "$BACK/new" -o "$BACK/new" @@ -34,7 +34,7 @@ case $1 in while read -r hash path do mkdir -p "$(dirname "$path")" - xz -dkc "$BACK/obj/$hash.xz" > "$path" + lz4 "$BACK/obj/$hash.lz4" "$path" done < "$BACK/rev/$2" ;; (log) diff --git a/pack/liblz4/build b/pack/liblz4/build @@ -0,0 +1,5 @@ +#!/bin/sh + +case $(uname) in (*BSD) gmake ;; (Linux) make ;; esac + +$make PREFIX="$OPT" install diff --git a/pack/liblz4/git b/pack/liblz4/git @@ -0,0 +1 @@ +git://github.com/lz4/lz4