summaryrefslogtreecommitdiff
path: root/.local/bin/upd
diff options
context:
space:
mode:
authorxyz <gky44px1999@gmail.com>2021-09-07 17:36:36 -0700
committerxyz <gky44px1999@gmail.com>2021-09-07 17:36:36 -0700
commitd7a80e6f6c61f4ef11f33faf2cfe0b94a3ae1bf7 (patch)
tree7344e764f96f17fb4d83acf23ffd8a59564199c1 /.local/bin/upd
parented8cf0d51437a8ab819a3e9a84433a7b0c652c94 (diff)
upd, integrate ref2, updgall and others
Diffstat (limited to '.local/bin/upd')
-rwxr-xr-x.local/bin/upd52
1 files changed, 52 insertions, 0 deletions
diff --git a/.local/bin/upd b/.local/bin/upd
new file mode 100755
index 00000000..dbc7b6b6
--- /dev/null
+++ b/.local/bin/upd
@@ -0,0 +1,52 @@
+#!/bin/sh
+# may need mkdir -p for some of the dirs? kg and ncm no need, how about refl and gall
+
+refl ()
+{
+ sudo reflector --save /etc/pacman.d/mirrorlist --latest 200 --sort rate
+}
+
+gall ()
+{
+ gallery-dl --download-archive "$XDG_DOCUMENTS_DIR/database/gallery-dl.sqlite3" -d "$XDG_PICTURES_DIR/anime" -i "$XDG_CONFIG_HOME/myconf/gallery_urls"
+}
+
+kg ()
+{
+ curlkg -u649b9e82272a348b "$XDG_MUSIC_DIR/not_pure/lan_lan/kg/"
+ curlkg -u64949d822c25328c "$XDG_MUSIC_DIR/not_pure/cheng_ruan/kg/"
+}
+
+ncm ()
+{
+ curlncm -a48860966 "$XDG_MUSIC_DIR/not_pure/lan_lan/ncm/artist/"
+ curlncm -a46703185 "$XDG_MUSIC_DIR/not_pure/cheng_ruan/ncm/artist/"
+ curlncm -r793052426 "$XDG_MUSIC_DIR/not_pure/lan_lan/ncm/djradio/"
+ curlncm -r792968433 "$XDG_MUSIC_DIR/not_pure/cheng_ruan/ncm/djradio/"
+}
+
+pac ()
+{
+ sudo pacman -Syu
+ paru -Syu
+ sudo pacman -Fy
+}
+
+if [ $# -eq 0 ]; then
+ pac
+ ncm
+ kg
+ refl
+ gall
+else
+ while getopts rgknp opt; do
+ case $opt in
+ r)refl;;
+ g)gall;;
+ k)kg;;
+ n)ncm;;
+ p)pac;;
+ \?)exit 1;;
+ esac
+ done
+fi