6a7f7a6d7532

Backup cleanup, bash enhancements
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Sat, 01 Feb 2020 12:56:34 -0500
parents 745c3f963e84
children 8da727b58a0f
branches/tags (none)
files bash_profile bin/backup-backblaze bin/backup-local fish/config.fish restic/excludes.txt

Changes

--- a/bash_profile	Fri Jan 31 13:03:56 2020 -0500
+++ b/bash_profile	Sat Feb 01 12:56:34 2020 -0500
@@ -23,7 +23,7 @@
 ORANGE=$'\e[33m'
 BLUE=$'\e[34m'
 PINK=$'\e[35m'
-CYAN=$'\e[36m'
+# CYAN=$'\e[36m'
 
 function last_return_value() {
     x="$?"
@@ -67,8 +67,37 @@
     }
 fi
 
-export PATH=~/bin:~/src/dotfiles/bin:~/src/dotfiles/lisp/bin:/usr/local/bin/:$PATH
-export PAGER=less
+function prepend_to_path {
+    if test -d "$1"; then
+        PATH="$1":"$PATH"
+    fi
+}
+
+PATH="/sbin"
+prepend_to_path "/bin"
+prepend_to_path "/usr/bin"
+prepend_to_path "/usr/sbin"
+prepend_to_path "/usr/local/bin"
+prepend_to_path "/usr/local/sbin"
+prepend_to_path "/usr/local/go/bin"
+prepend_to_path "/usr/games"
+prepend_to_path "/snap/bin"
+prepend_to_path "$HOME/.local/bin"
+prepend_to_path "$HOME/.go/bin"
+prepend_to_path "$HOME/src/dotfiles/lisp/bin"
+prepend_to_path "$HOME/src/dotfiles/bin"
+prepend_to_path "$HOME/src/hg"
+prepend_to_path "$HOME/bin"
+export PATH
+
+export LESS_TERMCAP_mb=$(printf '\e[01;31m')       # begin blinking
+export LESS_TERMCAP_md=$(printf '\e[01;38;5;74m')  # begin bold
+export LESS_TERMCAP_me=$(printf '\e[0m')           # end mode
+export LESS_TERMCAP_se=$(printf '\e[0m')           # end standout-mode
+export LESS_TERMCAP_so=$(printf '\e[38;5;246m')    # begin standout-mode - info box
+export LESS_TERMCAP_ue=$(printf '\e[0m')           # end underline
+export LESS_TERMCAP_us=$(printf '\e[04;38;5;146m') # begin underline
+export PAGER='less -iX'
 
 function psg() {
     ps auxww | grep --color=always "$@" | grep -v grep | collapse | cuts -f 2,11-
--- a/bin/backup-backblaze	Fri Jan 31 13:03:56 2020 -0500
+++ b/bin/backup-backblaze	Sat Feb 01 12:56:34 2020 -0500
@@ -2,6 +2,9 @@
 
 set -euo pipefail
 
+
+ban "Backblaze"
+
 source /home/sjl/.restic-backblaze-creds
 
 restic --repo b2:backups-ouroboros:restic-repo \
--- a/bin/backup-local	Fri Jan 31 13:03:56 2020 -0500
+++ b/bin/backup-local	Sat Feb 01 12:56:34 2020 -0500
@@ -2,6 +2,8 @@
 
 set -euo pipefail
 
+ban -F metal "NAS"
+
 restic --repo /mnt/cryo/restic-ouroboros/repo \
        --exclude-file=/home/sjl/src/dotfiles/restic/excludes.txt \
        --password-file /home/sjl/.restic-password-local \
--- a/fish/config.fish	Fri Jan 31 13:03:56 2020 -0500
+++ b/fish/config.fish	Sat Feb 01 12:56:34 2020 -0500
@@ -85,6 +85,7 @@
         end
     end
 end
+
 set -gx PATH "/sbin"
 prepend_to_path "/snap/bin"
 prepend_to_path "/usr/sbin"
@@ -107,7 +108,7 @@
 set -g -x EDITOR nvim
 set -g -x COMMAND_MODE unix2003
 set -g -x RUBYOPT rubygems
-set -g -x PAGER 'less -X'
+set -g -x PAGER 'less -iX'
 # set -g -x _JAVA_OPTIONS "-Djava.awt.headless=true"
 
 set -g -x GPG_TTY (tty)
--- a/restic/excludes.txt	Fri Jan 31 13:03:56 2020 -0500
+++ b/restic/excludes.txt	Sat Feb 01 12:56:34 2020 -0500
@@ -1,20 +1,31 @@
+*.fasl
 .cache
-cache2
+/home/sjl/.arduino15
+/home/sjl/.config/chromium
+/home/sjl/.config/discord
+/home/sjl/.config/google-chrome
+/home/sjl/.config/libreoffice
+/home/sjl/.config/unity3d
+/home/sjl/.crawl
 /home/sjl/.dbus
-/home/sjl/src/dotfiles/vim/tmp
-/home/sjl/snap
+/home/sjl/.dropbox
+/home/sjl/.dropbox-dist
+/home/sjl/.gimp-*
+/home/sjl/.go
+/home/sjl/.hg-git
+/home/sjl/.local/lib/python*
+/home/sjl/.local/share
+/home/sjl/.mozilla
+/home/sjl/.quicklisp
+/home/sjl/.rlwrap
+/home/sjl/.slime
+/home/sjl/.steam
+/home/sjl/.virtualenvs
+/home/sjl/Dropbox/.dropbox.cache
 /home/sjl/Videos
 /home/sjl/dwhelper
-/home/sjl/.mozilla
-/home/sjl/.dropbox
-/home/sjl/.steam
-/home/sjl/.quicklisp
-/home/sjl/.virtualenvs
-/home/sjl/.local/share
-/home/sjl/.local/lib/python*
-/home/sjl/.config/chromium
-/home/sjl/.config/libreoffice
-/home/sjl/.config/discord
-/home/sjl/.dropbox-dist
-/home/sjl/Dropbox/.dropbox.cache
-
+/home/sjl/snap
+/home/sjl/src/abcl
+/home/sjl/src/arduino
+/home/sjl/src/dotfiles/vim/tmp
+cache2