dot

packages and services management
Log | Files | Refs | README

commit 261855ce54d2bb201058e5f791892f6670e59d10
parent de1328c01e6d6c90f28a7de8392f7487f051612a
Author: josuah <mail@josuah.net>
Date:   Mon,  2 Jan 2017 22:06:46 +0100

Updated version usage notice.

Diffstat:
M.local/bin/version | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/.local/bin/version b/.local/bin/version @@ -27,12 +27,12 @@ usage() opt "$1" n 'n[ew]' 'new revision saving all tree content' opt "$1" d 'd[diff] [1 2]' 'diff revisions 1 and 2 (or latests)' opt "$1" r 'r[evision] REV' 'switch tree to revision REV' - opt "$1" m 'm[erge] TREE' 'merge current tree with foreign TREE' + opt "$1" m 'm[erge] 1 2' 'merge trees 1 and 2 together' exit 1 } -# Generate exclude rules for find(1) for each arguments +# Generate exclude rules for find(1) for each arguments. exclude() { @@ -56,9 +56,9 @@ init() new() { find . -type f $(exclude .git .version) -print0 | sort -z | - xargs -0 md5sum > .version/tmp + xargs -0 md5sum > .version/tmp || die 'hashing error' - md5="$(md5sum .version/tmp)" && md5="${md5%% *}" || die 'md5sum failed' + md5="$(md5sum .version/tmp)" && md5="${md5%% *}" || die 'hashing error' [ -f .version/history ] && old="$(tail -n 1 .version/history)" printf '1 %s\n2 %s\n' "$old" "$md5" @@ -112,7 +112,7 @@ applydiff() chmod +w "$path" ;; ( - ) - rm "${path:?error in diff}" + rm "$path" ;; esac done