2021-11-30 18:46:31 +01:00
|
|
|
#!/bin/bash
|
2018-12-21 17:38:50 +01:00
|
|
|
|
2021-11-30 18:46:31 +01:00
|
|
|
set -xeuo pipefail
|
2018-12-21 17:38:50 +01:00
|
|
|
|
2024-04-28 21:01:26 +02:00
|
|
|
export GIT_TERMINAL_PROMPT=0
|
|
|
|
export GIT_SSH_COMMAND='ssh -oBatchMode=yes'
|
|
|
|
|
2020-11-25 22:05:24 +01:00
|
|
|
# Push some git repos
|
2018-12-21 17:38:50 +01:00
|
|
|
pass git push
|
2024-03-01 20:36:09 +01:00
|
|
|
|
2024-07-14 11:27:57 +02:00
|
|
|
git --git-dir=$HOME/.cfg/ --work-tree=$HOME commit -am "Auto-commit $(hostnamectl --static) $(date '+%F %T')" || true
|
2019-09-24 16:13:41 +02:00
|
|
|
git --git-dir=$HOME/.cfg/ --work-tree=$HOME push
|
2018-12-21 17:38:50 +01:00
|
|
|
|
2020-12-23 09:08:37 +01:00
|
|
|
# Fetch a fresh copy of all locally cloned git repos
|
|
|
|
for dir in $(find /home/kunsi/git -mindepth 1 -maxdepth 1 -type d)
|
|
|
|
do
|
2023-01-22 15:58:23 +01:00
|
|
|
git -C "$dir" fetch --all || true
|
2020-12-23 09:08:37 +01:00
|
|
|
done
|
|
|
|
|
2020-11-25 22:05:24 +01:00
|
|
|
# Do a backup.
|
2022-02-13 08:47:44 +01:00
|
|
|
sudo /usr/local/bin/generate-backup-with-retries
|
2022-01-15 06:31:29 +01:00
|
|
|
printf '\a'
|
2021-11-30 18:46:31 +01:00
|
|
|
|
2020-11-25 22:05:24 +01:00
|
|
|
# Do updates
|
2022-01-15 06:31:29 +01:00
|
|
|
sudo pacman -Syu
|
2022-03-26 13:29:29 +01:00
|
|
|
sudo DIFFPROG='diff -u --color' pacdiff
|