From 1357592606e44356a09def730475cb1c4c7e3f2d Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Thu, 29 Sep 2016 17:32:02 -0400 Subject: [PATCH] Use new address for borg --- shells/zshrc | 10 ++++++++-- zsh/borg.zsh | 6 +++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/shells/zshrc b/shells/zshrc index f573336..90d19e4 100644 --- a/shells/zshrc +++ b/shells/zshrc @@ -187,7 +187,13 @@ if test -f /etc/gentoo-release; then echo "You're a server. Exiting" return fi - sudo zsh -c "(git -C /usr/portage pull&&(find /usr/portage -type f -exec chmod 644 {} \; ;find /usr/portage -type d -exec chmod 755 {} \;))&&echo Done pulling&&eix-update&&echo Done with eix" + sudo rm '/usr/portage/metadata/timestamp.chk' + if ex eix-update; then + sudo emaint sync -a + else + sudo zsh -c "echo Starting pull;emaint sync -a&&echo Done pulling&&eix-update&&echo Done with eix" + fi + sudo -k echo '\a' } elif test -f /etc/lsb-release; then @@ -228,7 +234,7 @@ fi alias stdns="sudo sh -c 'echo nameserver 8.8.8.8 > /etc/resolv.conf'" alias fvim="vim -u NONE +\"so ~/.vim/plugged/flappyvird-vim/plugin/flappyvird.vim\" +\"so ~/.vim/plugged/flappyvird-vim/autoload/flappyvird.vim\" +\":FlappyVird\" +\":q\"" alias fk='k `fzf --no-mouse -m -1 -x`' -alias susp="sudo true&&((slock;sleep 2;nmcli radio wifi off;nmcli radio wifi on)&echo mem | sudo tee /sys/power/state >/dev/null)" +alias susp="sudo true&&((slock;sleep 2;nmcli radio wifi off;nmcli radio wifi on)&echo mem | sudo tee /sys/power/state >/dev/null);sudo -k" if ex sudo; then alias s='sudo -Hu' fi diff --git a/zsh/borg.zsh b/zsh/borg.zsh index f5533e6..d500812 100644 --- a/zsh/borg.zsh +++ b/zsh/borg.zsh @@ -1,4 +1,4 @@ -REPO="aw:backup/backup.borg" +REPO="aw:borg" b-list() { if [[ -z "$1" ]]; then column -t <(borg list "$REPO") @@ -29,7 +29,7 @@ b-info() { borg info "$REPO"::"$1" } b-diff() { - REPO="aw:backup/backup.borg" + REPO="aw:borg" borg list "$REPO" echo -n "First ID: " read ID1 @@ -87,7 +87,7 @@ b-diff() { echo "$COMPLETED_FILE2" } b-size() { - REPO="aw:backup/backup.borg" + REPO="aw:borg" borg list "$REPO" echo -n "ID: " read ID