dot

packages and services management
Log | Files | Refs | README

commit 5b7a0a2176e7a99b977cbd2206b2e5dc5278c09d
parent 68f16559b9f10a147d091f37e1579a54d844a9c6
Author: josuah <mail@josuah.net>
Date:   Tue,  3 Jan 2017 01:55:25 +0100

Added more logs

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

diff --git a/.local/bin/version b/.local/bin/version @@ -55,6 +55,8 @@ init() new() { + printf 'making a new revision\n' + find . -type f $(exclude .git .version) -print0 | sort -z | xargs -0 md5sum > .version/tmp || die 'hashing error' @@ -105,6 +107,8 @@ revision() { new + printf 'applying revision "%s" to tree\n' "$1" + difftree "$(tail -n 1 .version/history)" "$1" | while read -r f md5 path do case "$f" in @@ -118,6 +122,8 @@ revision() ;; esac done + + printf '%s\n' "$1" >> .version/history } @@ -126,6 +132,7 @@ revision() pull() { printf 'importing objects from "%s" to "%s"\n' "$1" "$PWD" + find "$1/.version/obj" -type f | while IFS='' read -r path do [ -f "${path#$1/}" ] || { cp "$path" "${path#$1/}" || return 1; } done @@ -138,6 +145,8 @@ pull() cp "$1/.version/rev/$new" ".version/rev/$new" revision "$new" + + new }