dot

packages and services management
Log | Files | Refs | README

commit 20ba229b5c95d44b947b0bc9de925447a8755256
parent 86cd96ce925b32bf0d3d474bdc4ab004ff003a52
Author: Josuah Demangeonā  ā µ <mail@josuah.net>
Date:   Fri, 31 Mar 2017 16:41:48 +0200

.v/history -> .v/log

Diffstat:
Mbin/build | 14+++++++-------
Mbin/sam-man | 4+---
Mbin/version | 20++++++++++----------
3 files changed, 18 insertions(+), 20 deletions(-)

diff --git a/bin/build b/bin/build @@ -5,11 +5,11 @@ export LOCAL="$HOME/.local" export CONFIG="${CONFIG:-$HOME/.config}" export PROGRAMS="$HOME/programs" export PATH="$LOCAL/sbin:$LOCAL/bin:$PATH" -export CPATH="$LOCAL/include:$CPATH" export MANPATH="$LOCAL/share/man:$LOCAL/man:$MANPATH" -export LIBPATH="$LOCAL/lib:$LIBPATH" -export LD_RUN_PATH="$LOCAL/lib:$LD_RUN_PATH" -export LD_LIBRARY_PATH="$LOCAL/lib:$LD_LIBRARY_PATH" +#export CPATH="$LOCAL/include:$CPATH" +#export LIBPATH="$LOCAL/lib:$LIBPATH" +#export LD_RUN_PATH="$LOCAL/lib:$LD_RUN_PATH" +#export LD_LIBRARY_PATH="$LOCAL/lib:$LD_LIBRARY_PATH" [ "${0##*/}" = build ] && { @@ -76,9 +76,9 @@ compile() name="$1" PREFIX="$PROGRAMS/$name" script="$CONFIG/build/$name" - export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 - export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 - export CFLAGS="-I$CPATH -L$LIBPATH -static" +# export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 +# export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 +# export CFLAGS="-I$CPATH -L$LIBPATH -static" [ -f "$script" ] || [ -h "$script" ] || die "$name" "no build script" . "$script" diff --git a/bin/sam-man b/bin/sam-man @@ -2,6 +2,4 @@ tmp="$(mktemp)" -man "$@" | sed 's/.//g' > "$tmp" - -B "$tmp" +man "$@" | sed 's/.//g' diff --git a/bin/version b/bin/version @@ -55,9 +55,9 @@ new() test -f ".v/obj/$hash" || cp "$path" ".v/obj/$hash" done - mv -f .v/tmp ".v/rev/$($SUM .v/tmp | cut -d ' ' -f 1 | tee -a .v/log)" + mv -f .v/tmp ".v/rev/$($SUM .v/tmp | cut -d ' ' -f 1 >> .v/log)" tail -n 2 .v/log - printf '%s\n' "$(uniq .v/history)" > .v/history + printf '%s\n' "$(uniq .v/log)" > .v/log chmod -w .v/obj/* .v/rev/* } @@ -69,7 +69,7 @@ new() difftree() { IFS="$NL" - [ "$1" ] || set -- $(tail -n 2 ".v/history") + [ "$1" ] || set -- $(tail -n 2 ".v/log") [ $# -ne 2 ] && die 'can not find the two revisions to diff' unset IFS @@ -95,7 +95,7 @@ revision() printf 'applying revision "%s" to tree\n' "$1" - difftree "$(tail -n 1 .v/history)" "$1" | + difftree "$(tail -n 1 .v/log)" "$1" | while read -r f hash path do case "$f" in @@ -109,7 +109,7 @@ revision() esac done - printf '%s\n' "$1" >> .v/history + printf '%s\n' "$1" >> .v/log } @@ -127,12 +127,12 @@ pull() fi done - for revision in $(tac .v/history) + for revision in $(tac .v/log) do - grep "$revision" "$1/.v/history" > /dev/null && break + grep "$revision" "$1/.v/log" > /dev/null && break done || die "no revision common to \"$1\" and \"$PWD\"" - new="$(tail -n 1 "$1/.v/history")" + new="$(tail -n 1 "$1/.v/log")" cp "$1/.v/rev/$new" ".v/rev/$new" revision "$new" @@ -150,7 +150,7 @@ main() case "$1" in ( d | diff | r | revision | m | merge | p | pull ) - [ -f .v/history ] || die "no revision in \"$PWD\"" + [ -f .v/log ] || die "no revision in \"$PWD\"" esac case "$1" in @@ -184,7 +184,7 @@ main() ( p | pull ) [ $# -eq 2 ] || usage m [ -d "$2/.v" ] || die "no \".v/\" in \"$2\"" - [ -f "$2/.v/history" ] || die "no revision in \"$2\"" + [ -f "$2/.v/log" ] || die "no revision in \"$2\"" pull "$(cd "$2" || exit 1; pwd)" ;;