X-Git-Url: https://git.madduck.net/code/myrepos.git/blobdiff_plain/24c62f2163a36a7dd9a4850864666c869e67763c..e821ea993dbbf8369632f6a172b919dd7247b60e:/lib/unison diff --git a/lib/unison b/lib/unison index abe9584..ffe5205 100644 --- a/lib/unison +++ b/lib/unison @@ -1,4 +1,4 @@ -# This allows using unison as a "revison control system" with mr. +# This allows using unison as a "version control system" with mr. # # You need to configure unison by setting up files in ~/.unison named # the same as the basenames of the directories you want to sync, and @@ -15,6 +15,7 @@ # And an example repo using it would look something like: #[music] #unison_test = true +#checkout = unison_checkout music lib = # The name of the directory containing the repo is assumed to @@ -22,10 +23,15 @@ lib = unison_config() { basename "$MR_REPO" } + unison_batch() { + unison -batch $(unison_config) + } + unison_checkout() { + mkdir "$1" && cd "$1" && unison -batch "$1" + } -unison_checkout = unison -batch $(unison_config) -unison_update = unison -batch $(unison_config) -unison_push = unison -batch $(unison_config) +unison_update = unison_batch +unison_push = unison_batch unison_commit = unison $(unison_config) # vim:sw=8:sts=0:ts=8:noet