From dd0f0489921444a77e4b204823c64c5703bec706 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 6 Aug 2022 09:47:04 -0700 Subject: lib/dionysus content now merged into other annexes --- .mrconfig.in | 28 ---------------------- archive/bin/sync-for-dionysus | 54 +++++++++++++++++++++++++++++++++++++++++++ bin/locmaint | 3 +-- bin/sync-for-dionysus | 54 ------------------------------------------- bin/usbskelhere | 2 +- 5 files changed, 56 insertions(+), 85 deletions(-) create mode 100755 archive/bin/sync-for-dionysus delete mode 100755 bin/sync-for-dionysus diff --git a/.mrconfig.in b/.mrconfig.in index c7f5e899..0af23e33 100644 --- a/.mrconfig.in +++ b/.mrconfig.in @@ -635,34 +635,6 @@ fixups = git annex adjust --hide-missing --unlock fi -# --- git annex for university stuff - -[lib/dionysus] -checkout = git clone demeterp:dionysus -post_checkout = - cd dionysus - git annex init - on athena || git remote add athena athenah:lib/dionysus -status = git annex status -update = git annex sync --no-content -push = git annex sync --content -#sync = sync-for-dionysus -sync = git annex sync --content - -# origin remote is just for keeping a backup copy of metadata. athena -# remote, in $HOME on athena, contains a copy of content. At present, -# origin remote only updated by sysmaint script (run weekly) -fixups = - git config push.default matching - git config annex.startupscan false - git config annex.autocommit true # needed for ga sync - git config annex.addunlocked true # for simplicity with existing workflows - git config remote.origin.annex-ignore true - git config mrrepo.review-unused false - git config unpushed-tags.ignore true - -skip = lazy - # --- git annex for podcasts [lib/podcasts] diff --git a/archive/bin/sync-for-dionysus b/archive/bin/sync-for-dionysus new file mode 100755 index 00000000..3dc366a1 --- /dev/null +++ b/archive/bin/sync-for-dionysus @@ -0,0 +1,54 @@ +#!/bin/sh + +. "$HOME/.shenv" +. "$HOME/src/dotfiles/lib-src/tputfs.sh" + +# Sync ~/lib/dionysus annex, taking account of how I access it from +# dionysus. Obsoleted by receive.denyCurrentBranch=updateInstead, +# once git annex >= 6.20170228 reaches athena + +set -e + +LOCAL="$HOME/lib/dionysus" +FLASH="/media/swhitton/SPWHITTON/doc" + +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) + ssh athena 'cd $HOME/'"$1"' && . $HOME/.shenv && '"$2" +} + +if [ "$(hostname -f)" = "athena.silentflame.com" ]; then + cd "$LOCAL" && git annex add && git annex sync +else + # if [ -d "$FLASH" ]; then + # status adding new content on nickflash + # cd $FLASH && git annex add && git annex sync --no-pull --no-push --message=add + # fi + + status work around gnupg bug on athena + ssh athena 'rm $XDG_RUNTIME_DIR/gnupg/*' ||: + + status adding and syncing on athena + athena_cmd lib/dionysus "git annex add" + athena_cmd lib/dionysus "git annex sync origin" + + status running main sync from ~/lib/dionysus + # if [ -d "$FLASH" ]; then + # cd "$LOCAL" && git annex add && git annex sync --content athena nickflash + # else + cd "$LOCAL" && git annex add && git annex sync --content + # fi + + # if [ -d "$FLASH" ]; then + # status ensuring that new files on nickflash checked out + # cd $FLASH && git annex sync + # status attempting to unmount nickflash + # kill-ssh-and-umount /media/swhitton/SPWHITTON # TODO use $FLASH + # fi + + status ensuring that new files on athena checked out + # athena_cmd lib/dionysus "git annex merge" + athena_cmd lib/dionysus "git annex sync origin" +fi diff --git a/bin/locmaint b/bin/locmaint index f551e9a1..30808620 100755 --- a/bin/locmaint +++ b/bin/locmaint @@ -99,8 +99,7 @@ our @remote_annexes = ( { origin => "athenag:annex.git", homedir => "lib/annex", lazy => 1 }, { origin => "athenag:annex19.git", homedir => "annex" }, { origin => "athenag:libpriv.git", homedir => "lib/priv" }, - { origin => "athena:wikiannex", homedir => "lib/wikiannex" }, - { origin => "athenap:dionysus", homedir => "lib/dionysus" }); + { origin => "athena:wikiannex", homedir => "lib/wikiannex" }); for (getpwuid($<) . '@' . `hostname -f`) { chomp; diff --git a/bin/sync-for-dionysus b/bin/sync-for-dionysus deleted file mode 100755 index 3dc366a1..00000000 --- a/bin/sync-for-dionysus +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh - -. "$HOME/.shenv" -. "$HOME/src/dotfiles/lib-src/tputfs.sh" - -# Sync ~/lib/dionysus annex, taking account of how I access it from -# dionysus. Obsoleted by receive.denyCurrentBranch=updateInstead, -# once git annex >= 6.20170228 reaches athena - -set -e - -LOCAL="$HOME/lib/dionysus" -FLASH="/media/swhitton/SPWHITTON/doc" - -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) - ssh athena 'cd $HOME/'"$1"' && . $HOME/.shenv && '"$2" -} - -if [ "$(hostname -f)" = "athena.silentflame.com" ]; then - cd "$LOCAL" && git annex add && git annex sync -else - # if [ -d "$FLASH" ]; then - # status adding new content on nickflash - # cd $FLASH && git annex add && git annex sync --no-pull --no-push --message=add - # fi - - status work around gnupg bug on athena - ssh athena 'rm $XDG_RUNTIME_DIR/gnupg/*' ||: - - status adding and syncing on athena - athena_cmd lib/dionysus "git annex add" - athena_cmd lib/dionysus "git annex sync origin" - - status running main sync from ~/lib/dionysus - # if [ -d "$FLASH" ]; then - # cd "$LOCAL" && git annex add && git annex sync --content athena nickflash - # else - cd "$LOCAL" && git annex add && git annex sync --content - # fi - - # if [ -d "$FLASH" ]; then - # status ensuring that new files on nickflash checked out - # cd $FLASH && git annex sync - # status attempting to unmount nickflash - # kill-ssh-and-umount /media/swhitton/SPWHITTON # TODO use $FLASH - # fi - - status ensuring that new files on athena checked out - # athena_cmd lib/dionysus "git annex merge" - athena_cmd lib/dionysus "git annex sync origin" -fi diff --git a/bin/usbskelhere b/bin/usbskelhere index 06f89cab..d242e482 100755 --- a/bin/usbskelhere +++ b/bin/usbskelhere @@ -12,7 +12,7 @@ skelhere () cp -L ~/lib/pro.terminal lib cp -L "$HOME/lib/annex/doc/sounds/Rainy Mood pomodoro.mp3" lib zip -j lib/spwhitton.zip lib/*.reg bin/* - status now you might want to clone ~/lib/dionysus\; see comproc.org + # status now you might want to clone ~/lib/dionysus\; see comproc.org } while true; do -- cgit v1.2.3