summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2024-01-13 22:44:53 +0000
committerXiao Pan <gky44px1999@gmail.com>2024-01-13 22:44:53 +0000
commita3699f61aa8c82074bc273b932fbfb41e2370853 (patch)
treeb2f15666d0cef6da863a23a792f1de2752299c7c
parenta6b781647806d21cae7ee5631c7bc4e8d1d0f17a (diff)
update
-rw-r--r--etc/myconf/cfgl_meta1
-rwxr-xr-xhome/xyz/.local/bin/upd80
2 files changed, 0 insertions, 81 deletions
diff --git a/etc/myconf/cfgl_meta b/etc/myconf/cfgl_meta
index 5715c4b7..f5024f95 100644
--- a/etc/myconf/cfgl_meta
+++ b/etc/myconf/cfgl_meta
@@ -68,7 +68,6 @@
644 xyz wheel //home/xyz/.gnupg/gpg.conf
755 xyz wheel //home/xyz/.local
755 xyz wheel //home/xyz/.local/bin
-755 xyz wheel //home/xyz/.local/bin/upd
644 xyz wheel //home/xyz/.profile
700 xyz wheel //home/xyz/.ssh
644 xyz wheel //home/xyz/.ssh/authorized_keys
diff --git a/home/xyz/.local/bin/upd b/home/xyz/.local/bin/upd
deleted file mode 100755
index 7e5665ad..00000000
--- a/home/xyz/.local/bin/upd
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/bin/sh
-
-all () {
- fast
- clean
- refl
-}
-
-backup () {
- rsync -avPR --delete ka:/home/xyz/.config/qBittorrent :/home/xyz/.local/share/qBittorrent "$HOME/backup/ka"
- # --use-agent not working, works on insp, not sure why
- sudo duplicity --ssh-askpass --encrypt-key 9790577D2BE328D46838117ED3F54FE03F3C68D6 --sign-key 05899270DF25BB1EEDF57BE824F769E5D08C9E9A --full-if-older-than 2Y --include /etc/.cfgs --include /home/xyz/.config/qBittorrent --include /home/xyz/.local/share/qBittorrent --exclude / / sftp://xyz@xyzka.kyun.li//home/xyz/backup/studio
-}
-
-clean () {
- paru -aSc --noconfirm
-}
-
-# basic daily stuff
-fast () {
- pac
- misc
- backup
-}
-
-misc () {
- "$EDITOR" +PlugClean! +PlugUpdate +qa
-}
-
-pac () {
- pacpacs="$(sudo pacman --noconfirm -Syu | tee /dev/tty | grep -m1 '^Packages' | cut -d' ' -f3-)"
- # Update rust toolchains before paru so paru can compile things in newest rust if needed.
- rustup update
- aurpacs="$(paru --color never --noconfirm -aSu | tee /dev/tty | grep -m1 '^Aur' | cut -d' ' -f3-)"
- # part steal from aur comment
- # sometimes "ERROR: Failure while downloading": https://github.com/neovim/neovim/issues/15709
- # echo 1, printf 1 and yes 1 all works? not sure why
- # aur neovim-nightly-bin has some issue on 12/26/2021? switch to community repo neovim temporary
- #rm -rf ~/.cache/paru/clone/neovim-nightly-bin/ && echo 1 | PARU_PAGER=cat paru --rebuild --redownload neovim-nightly-bin
- pacman -Qqme > "$XDG_CONFIG_HOME/myconf/pacman_Qqme"
- pacman -Qqne > "$XDG_CONFIG_HOME/myconf/pacman_Qqne"
- systemctl list-unit-files --state=enabled > "$XDG_CONFIG_HOME/myconf/sye"
- systemctl --user list-unit-files --state=enabled > "$XDG_CONFIG_HOME/myconf/syue"
- # pacdiff default use pacman database, so no need `sudo -E` for find, but will be a little bit slower
- log="$log
-updated pacman packages: $pacpacs
-updated aur packages: $aurpacs
-pacdiff: $(pacdiff -o | tr '\n' ' ')
-checkrebuild: $(checkrebuild)
-$(if echo "$pacpacs" | grep -q 'linux-[0-9]'; then echo 'kernel upgraded, need reboot'; fi)
-"
-}
-
-refl () {
- # why not use http:
- # https://www.reddit.com/r/archlinux/comments/kx149z/should_i_use_http_mirrors/
- # https://www.reddit.com/r/archlinux/comments/ej4k4d/is_it_safe_to_use_not_secured_http_pacman_mirrors/
- # rsync may need to change XferCommand in /etc/pacman.conf
- # https://www.reddit.com/r/archlinux/comments/mynw6e/rsync_mirrors_with_pacman/
- # need --delay so no super out of sync mirrors
- sudo reflector --verbose --save /etc/pacman.d/mirrorlist --country us --protocol https --delay 1 --latest 25 --score 25 --fastest 10
-}
-
-if [ $# -eq 0 ]; then
- fast
-else
- while getopts abcfmpr opt; do
- case $opt in
- a)all;;
- b)backup;;
- c)clean;;
- f)fast;;
- m)misc;;
- p)pac;;
- r)refl;;
- \?)exit 1;;
- esac
- done
-fi
-[ "$log" ] && printf '%s' "$log" | tee "$XDG_DOCUMENTS_DIR/logs/upd.log"