dip

old school recipes for janitorial snafu.
git clone git://git.ricketyspace.net/dip.git
Log | Files | Refs

commit 52a785467bda78e59b2c82aecd01ee864aee6984
parent 120968ab49b1e0b8db0d80e67978dc43eb9f374d
Author: rsiddharth <s@ricketyspace.net>
Date:   Thu, 24 May 2018 22:12:59 +0000

usr: Add annex-to (from dotfiles).

Diffstat:
usr/local/bin/annex-to | 23+++++++++++++++++++++++
1 file changed, 23 insertions(+), 0 deletions(-)

diff --git a/usr/local/bin/annex-to b/usr/local/bin/annex-to @@ -0,0 +1,23 @@ +#!/bin/sh +# +# License: CC0-1.0 +# +# annex-to path +GIT_ANNEX='/usr/bin/git-annex' +ANNEX_PATH=$1 +GET=$2 + +if [ -z $GET ]; then + GET='--all' +fi + +if [ -d $ANNEX_PATH ]; then + echo 'annexing to' $ANNEX_PATH '...' + cd $ANNEX_PATH + $GIT_ANNEX sync + $GIT_ANNEX get $GET + echo 'finished annexing to' $ANNEX_PATH +else + echo $ANNEX_PATH 'not found.' + exit 1 +fi