summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xupd36
1 files changed, 22 insertions, 14 deletions
diff --git a/upd b/upd
index 0fd1e14..9d99d7a 100755
--- a/upd
+++ b/upd
@@ -65,16 +65,17 @@ backup () {
}
clean () {
- nsxiv -c
- # my ways
- # -exec can't replace -execdir here
- find "$XDG_CACHE_HOME/nsxiv/" -depth -type d -empty -execdir rmdir -- '{}' \+
- # -exec can replace -execdir here
- #find "$XDG_CACHE_HOME/nsxiv/" -depth -type d -execdir rmdir --ignore-fail-on-non-empty -- '{}' \+
- # nsxiv man page way
- #find "$XDG_CACHE_HOME/nsxiv/" -depth -type d -empty ! -name '.' -exec rmdir -- '{}' \;
+ if [ "$hostname" = xyzinsp ]; then
+ nsxiv -c
+ # my ways
+ # -exec can't replace -execdir here
+ find "$XDG_CACHE_HOME/nsxiv/" -depth -type d -empty -execdir rmdir -- '{}' \+
+ # -exec can replace -execdir here
+ #find "$XDG_CACHE_HOME/nsxiv/" -depth -type d -execdir rmdir --ignore-fail-on-non-empty -- '{}' \+
+ # nsxiv man page way
+ #find "$XDG_CACHE_HOME/nsxiv/" -depth -type d -empty ! -name '.' -exec rmdir -- '{}' \;
- rm -rf "$XDG_VIDEOS_DIR/recordings/tmp/"
+ fi
if [ "$hostname" = xyzinsp ] || [ "$hostname" = xyzpp ]; then
cd "$HOME/.mozilla/firefox/xxxxxxxx.fly/prefsjs_backups" || exit
@@ -84,6 +85,7 @@ clean () {
sudo systemctl stop atd
echo 0 | sudo tee /var/spool/atd/.SEQ > /dev/null
sudo systemctl start atd
+ rm -rf "$XDG_VIDEOS_DIR/recordings/tmp/"
fi
paru -aSc --noconfirm
@@ -106,19 +108,25 @@ userjs () {
misc () {
"$EDITOR" +PlugClean! +PlugUpdate +qa
- tldr --update
- sudo hardcode-fixer
- # temperory solution before find a way of using git submodule or subtree with `cfg -l`
- git -C "$HOME/.mozilla/firefox/xxxxxxxx.fly/chrome/firefox-csshacks" pull
+
+ if [ "$hostname" = xyzinsp ] || [ "$hostname" = xyzpp ]; then
+ tldr --update
+ fi
+
if [ "$hostname" = xyzinsp ]; then
+ sudo hardcode-fixer
ssh pp '[ -s "$HOME/.local/share/sdcv_history" ] && cat "$HOME/.local/share/sdcv_history" && rm "$HOME/.local/share/sdcv_history"' >> "$XDG_DATA_HOME/sdcv_history"
awk '!a[$0]++' "$XDG_DATA_HOME/sdcv_history" | sponge "$XDG_DATA_HOME/sdcv_history"
+ # temperory solution before find a way of using git submodule or subtree with `cfg -l`
+ git -C "$HOME/.mozilla/firefox/xxxxxxxx.fly/chrome/firefox-csshacks" pull
git -C "$XDG_DOCUMENTS_DIR/notes" commit --all -m 'update'
git -C "$XDG_DOCUMENTS_DIR/notes" push
git -C "$HOME/programs/reminders" commit --all -m 'update'
git -C "$HOME/programs/reminders" push
pass git push
- elif [ "$hostname" = xyzpp ]; then
+ fi
+
+ if [ "$hostname" = xyzpp ]; then
git -C "$XDG_DOCUMENTS_DIR/notes" pull
git -C "$HOME/programs/reminders" pull
pass git pull