~idmyn/dotfiles

716a4386ff35c78559cc22046cff426e0b627087 — David Mynors a month ago 6022e37
Update backup script to log errors
2 files changed, 11 insertions(+), 9 deletions(-)

M backup.sh
M shell/elvish/rc.elv
M backup.sh => backup.sh +10 -8
@@ 11,13 11,15 @@ echo "Beginning backup at `date`" >> $LOGFILE

source .backup.env

restic -r b2:idmyn-mbp-restic:backup backup ~ \
    --exclude="**/node_modules"               \
    --exclude="${HOME}/desk"                  \
    --exclude="${HOME}/files"                 \
    --exclude="${HOME}/.asdf"                 \
    --exclude="${HOME}/.Trash"                \
    --exclude="${HOME}/Library"               \
    >> $LOGFILE
/usr/local/bin/restic -r b2:idmyn-mbp-restic:backup backup ~ \
    --exclude="**/node_modules"                              \
    --exclude="${HOME}/desk"                                 \
    --exclude="${HOME}/files"                                \
    --exclude="${HOME}/.asdf"                                \
    --exclude="${HOME}/.Trash"                               \
    --exclude="${HOME}/Library"                              \
    --exclude="${HOME}/Documents"                            \
    --exclude="${HOME}/Pictures"                             \
    >> $LOGFILE 2>&1

printf "\n*******************************************************\n\n" >> $LOGFILE

M shell/elvish/rc.elv => shell/elvish/rc.elv +1 -1
@@ 37,7 37,7 @@ edit:insert:binding[Alt+Backspace]=$edit:kill-small-word-left~
# aliases

fn e [@a]{
  if (> (ps -ax | rg -c emacs) 1) {
  if (pgrep -f emacs) {
    if (> (emacsclient -e '(length (frame-list))') 1) {
      osascript -e 'tell application "emacs" to activate first window'
      emacsclient -n $@a