dotfiles/.bin/backup-and-update-system
2022-02-13 08:47:44 +01:00

23 lines
444 B
Bash
Executable file

#!/bin/bash
set -xeuo pipefail
backup_ssh="kunsi-t470@backup-kunsi.htz-hel.kunbox.net"
# Push some git repos
pass git push
git --git-dir=$HOME/.cfg/ --work-tree=$HOME push
# Fetch a fresh copy of all locally cloned git repos
for dir in $(find /home/kunsi/git -mindepth 1 -maxdepth 1 -type d)
do
git -C "$dir" fetch || true
done
# Do a backup.
sudo /usr/local/bin/generate-backup-with-retries
printf '\a'
# Do updates
sudo pacman -Syu