I _really_ hate make errors.
[v.git] / v
blob297ed3060929b9f9dcb010616ad0483a4136a36b
1 #!/bin/sh
2 commit()
4 ls -a | fgrep -xv -e . -e .. -e .v | xargs tar cjf "$dir/$(date +%s)"
5 cat >>"$dir/l"
6 printf '\n' >>"$dir/l"
8 rollback()
10 [ -z "$1" ] && v=1 || v="$1"
11 tar xjf "$dir/$(ls -t $dir | fgrep -xv l | sed -n \"$v\"p )"
13 nuke()
15 ls -a | fgrep -xv -e . -e .. -e .v | xargs rm -rf --
16 rollback "$1"
18 branch()
20 [ -z "$1" ] && exit 1
21 mkdir -p ".v/$1"
22 printf '%s' "$1" >.v/b
24 merge()
26 [ -z "$1" ] && exit 1
27 tar xjf "$1"
28 commit
30 wipe()
32 cd "$dir"
33 ls -t | fgrep -xv l | sed 1d | xargs rm --
35 dir=".v/$(cat .v/b)"
36 t=$1
37 shift
38 $(cat <<. | grep "^$t") "$@"
39 commit
40 rollback
41 nuke
42 branch
43 merge
44 wipe