forked from kunsi/dotfiles
26 lines
619 B
Bash
Executable file
26 lines
619 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -xeuo pipefail
|
|
|
|
export GIT_TERMINAL_PROMPT=0
|
|
export GIT_SSH_COMMAND='ssh -oBatchMode=yes'
|
|
|
|
# Push some git repos
|
|
pass git push
|
|
|
|
git --git-dir=$HOME/.cfg/ --work-tree=$HOME commit -am "Auto-commit $(hostnamectl --static) $(date '+%F %T')"
|
|
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 --all || true
|
|
done
|
|
|
|
# Do a backup.
|
|
sudo /usr/local/bin/generate-backup-with-retries
|
|
printf '\a'
|
|
|
|
# Do updates
|
|
sudo pacman -Syu
|
|
sudo DIFFPROG='diff -u --color' pacdiff
|