diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2016-03-03 11:32:26 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2016-03-03 11:32:26 -0700 |
commit | d760914b08f34e308cc35ec98af25f298eac2afd (patch) | |
tree | 4bee93a5ed044bf137f8f2387eb18f8a7ccc4811 | |
parent | 9894205600d5be4032f8eedf0d23d82ed69d7d7f (diff) | |
download | dotfiles-d760914b08f34e308cc35ec98af25f298eac2afd.tar.gz |
tweak sync-for-dionysus
-rwxr-xr-x | bin/sync-for-dionysus | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/bin/sync-for-dionysus b/bin/sync-for-dionysus index 0c429db0..0823fe44 100755 --- a/bin/sync-for-dionysus +++ b/bin/sync-for-dionysus @@ -1,32 +1,31 @@ #!/bin/sh -. $HOME/.shenv +. "$HOME/.shenv" athena_cmd () { # here we rely on the fact that ssh already passes argument # through `/bin/sh -c' (note use of single-quotes in this # function) - local dir=$1 - local cmd=$2 + # local dir=$1 + # local cmd=$2 ssh athena 'cd $HOME/'"$1"' && . $HOME/.shenv && '"$2" } if [ "$(hostname -f)" = "athena.silentflame.com" ]; then - cd $HOME/doc + cd "$HOME/doc" mr sync - cd $HOME/lib/dionysus + cd "$HOME/lib/dionysus" git annex merge else # try to sync nickflash first - cd /media/swhitton/SPWHITTON/doc && git annex add && git annex sync --content || true - cd $HOME/lib/dionysus - git annex sync --content athena + cd /media/swhitton/SPWHITTON/doc 2>/dev/null && git annex add && git annex sync --content || true + cd "$HOME/lib/dionysus" && git annex add && git annex sync --content athena # try to sync nickflash again - cd /media/swhitton/SPWHITTON/doc && git annex sync --content || true - sudo umount /media/swhitton/SPWHITTON || true + cd /media/swhitton/SPWHITTON/doc 2>/dev/null && git annex sync ---content && sudo umount /media/swhitton/SPWHITTON || true athena_cmd lib/dionysus "git annex merge" + athena_cmd doc "mr sync" - cd $HOME/doc + cd "$HOME/doc" mr sync athena_cmd doc "mr sync" fi |