From dc240a7216c3b4d587f036e1efdd9897fc624a24 Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Tue, 19 Mar 2024 01:42:00 -0700 Subject: upd consider xyzca --- sh/upd | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sh/upd') diff --git a/sh/upd b/sh/upd index 9263f32..c92957b 100755 --- a/sh/upd +++ b/sh/upd @@ -29,7 +29,7 @@ backup () { git pull # Push ka and ia branch to codeberg or any future alternative website for mirroring. Needed for public codes/data, considering my death may result in all copies on my computers being lost. case "$branch" in - ka|ia) git push;; + ka|ia|ca) git push;; esac done # git checkout will change mtime, need to change back so rsync won't think it needs to backup these files @@ -47,6 +47,8 @@ backup () { sudo -E git -C /root/programs/config_local_arch_secrets pull # backup ia cfgs sudo -E git -C /root/programs/config_local_arch_secrets_ia pull + # backup ca cfgs + sudo -E git -C /root/programs/config_local_arch_secrets_ca pull ) # rsync backup from studio to insp @@ -61,13 +63,13 @@ backup () { rsync -avPR --delete ia:/home/xyz/.config/qBittorrent :/home/xyz/.local/share/qBittorrent/BT_backup "$HOME/backup/ia" fi - if [ "$hostname" != xyzstudio ] && [ "$hostname" != xyzka ] && [ "$hostname" != xyzia ] ; then + if [ "$hostname" != xyzstudio ] && [ "$hostname" != xyzka ] && [ "$hostname" != xyzia ] && [ "$hostname" != xyzca ]; then # rsync backup to studio # --files-from make -a not imply -r, so need to specify explicitly rsync -avPRr --delete --files-from="$XDG_CONFIG_HOME/myconf/upd_rsync_files" / "studio:/home/xyz/backup/$backup_branch" fi - if [ "$hostname" != xyzka ] && [ "$hostname" != xyzia ]; then + if [ "$hostname" != xyzka ] && [ "$hostname" != xyzia ] && [ "$hostname" != xyzca ]; then # duplicity backup to ka # https://wiki.archlinux.org/title/Duplicity # Need // for absolute path, see manpage URL FORMAT section. If not use //, will store to /home/xyz/home/xyz/... @@ -111,7 +113,7 @@ clean () { fast () { pac misc - if [ "$hostname" != xyzka ] && [ "$hostname" != xyzia ]; then + if [ "$hostname" != xyzka ] && [ "$hostname" != xyzia ] && [ "$hostname" != xyzca ]; then backup fi } -- cgit v1.2.3-70-g09d2