2021-11-30 17:46:31 +00:00
|
|
|
#!/bin/bash
|
2018-12-21 16:38:50 +00:00
|
|
|
|
2021-11-30 17:46:31 +00:00
|
|
|
set -xeuo pipefail
|
2018-12-21 16:38:50 +00:00
|
|
|
|
2024-04-28 19:01:26 +00:00
|
|
|
export GIT_TERMINAL_PROMPT=0
|
|
|
|
export GIT_SSH_COMMAND='ssh -oBatchMode=yes'
|
|
|
|
|
2020-11-25 21:05:24 +00:00
|
|
|
# Push some git repos
|
2018-12-21 16:38:50 +00:00
|
|
|
pass git push
|
2024-03-01 19:36:09 +00:00
|
|
|
|
2024-03-23 11:52:38 +00:00
|
|
|
git --git-dir=$HOME/.cfg/ --work-tree=$HOME commit -am "Auto-commit $(hostnamectl --static) $(date '+%F %T')"
|
2019-09-24 14:13:41 +00:00
|
|
|
git --git-dir=$HOME/.cfg/ --work-tree=$HOME push
|
2018-12-21 16:38:50 +00:00
|
|
|
|
2020-12-23 08:08:37 +00: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 14:58:23 +00:00
|
|
|
git -C "$dir" fetch --all || true
|
2020-12-23 08:08:37 +00:00
|
|
|
done
|
|
|
|
|
2020-11-25 21:05:24 +00:00
|
|
|
# Do a backup.
|
2022-02-13 07:47:44 +00:00
|
|
|
sudo /usr/local/bin/generate-backup-with-retries
|
2022-01-15 05:31:29 +00:00
|
|
|
printf '\a'
|
2021-11-30 17:46:31 +00:00
|
|
|
|
2020-11-25 21:05:24 +00:00
|
|
|
# Do updates
|
2022-01-15 05:31:29 +00:00
|
|
|
sudo pacman -Syu
|
2022-03-26 12:29:29 +00:00
|
|
|
sudo DIFFPROG='diff -u --color' pacdiff
|