This commit is contained in:
Dym Sohin 2023-12-25 18:49:51 +01:00
parent 860bc7cdf6
commit a5f3d109dc
7 changed files with 58 additions and 31 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/env zsh
BAK="/mnt/self-files"
BAK="/home/dym/Servers/self-files"
if [ ! -z "$1" ]; then
BAK="$1"
fi
@ -13,15 +13,13 @@ cp /home/dym/.config/doublecmd/doublecmd.xml \
/Cfg/doublecmd/
DIRS=(
_
Apps
Cfg
home/dym/.privat
)
for DIR in "${DIRS[@]}"; do
echo "-
-
# '$DIR'"
# '/$DIR'"
sudo \
rsync -zrhP --links --size-only --verbose --delete \
--exclude '**/.Trash-1000' \
@ -29,13 +27,13 @@ for DIR in "${DIRS[@]}"; do
--exclude '**/node_modules/' \
--exclude '**/target/' \
"/$DIR/" \
"$BAK/${DIR}"
"$BAK/${DIR}_bak"
done
echo "-
-
# '.privat'"
# '~/.privat'"
sudo \
rsync -zrhP --links --size-only --verbose --delete \
"/home/dym/.privat/" \
"$BAK/.privat"
"$BAK/.privat_bak"

View File

@ -9,11 +9,11 @@ BAK="/Data/_bak"
restic backup '/home/dym/.privat' \
-p '/home/dym/.privat/restic/p.txt' \
-r "$BAK/.privat"
-r "$BAK/.privat_home"
# cd `realpath "$0" | xargs dirname`
# ./bak-home "$BAK/Home_nix"
cd `realpath "$0" | xargs dirname`
./bak-home.sh "$BAK/Home_deb"
sudo \
@ -22,7 +22,7 @@ rsync -zrhP --links --size-only --verbose --delete \
--exclude '**/__sapper__/' \
--exclude '**/node_modules/' \
--exclude '**/target/' \
"/Servers/self-files/My/" \
"/Servers/self/My/" \
"/Data/_my"
@ -37,12 +37,16 @@ rsync -zrhP --links --size-only --verbose --delete \
DIRS=(
_
Books
Cfg_nix
Code
Img
Music
Ui
Forks
Fonts
Templates
Work
)
for DIR in "${DIRS[@]}"; do
echo "-
@ -54,12 +58,13 @@ for DIR in "${DIRS[@]}"; do
--exclude '**/__sapper__/' \
--exclude '**/node_modules/' \
--exclude '**/target/' \
"/Servers/self-files/$DIR/" \
"/Servers/self/$DIR/" \
"$BAK/${DIR}"
done
DIRS=(
Apps
Cfg
)
for DIR in "${DIRS[@]}"; do
echo "-
@ -76,14 +81,7 @@ for DIR in "${DIRS[@]}"; do
done
echo "-
-
# '.fonts'"
sudo \
rsync -zrhP --links --size-only --verbose --delete \
--exclude '**/.Trash-1000' \
--exclude '**/__sapper__/' \
--exclude '**/node_modules/' \
--exclude '**/target/' \
"/home/dym/.fonts/" \
"$BAK/Fonts"
"/var/lib/docker/" \
"$BAK/var_lib_docker"

9
bak-server_to_archive.sh Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env zsh
BAK="/Data/_server"
rsync -zrhP --links --size-only --verbose --delete \
"/Servers/infra/var/www/gotosocial/storage/" \
"$BAK/gotosocial/storage"

7
meta.kdl Normal file
View File

@ -0,0 +1,7 @@
title "scripts/_dump"
description "a pile of shell script too small to get their own repos"
media-type "cli"
tags "config" "scripts"
license "0BSD"
homepage "https://dym.sh/scripts-dump/"
source "https://source.garden/scripts/_dump/"

View File

@ -1,3 +1,3 @@
# _dump
# \_dump
> a pile of shell script too small to get their own repos

View File

@ -15,8 +15,10 @@ mv /_/*\[nav*.(jpg|png|gif|webp|avif|svg) "$UI_PATH"
mv /_/*\[part*.(jpg|png|gif|webp|avif|svg) "$UI_PATH"
mv /_/*\[section*.(jpg|png|gif|webp|avif|svg) "$UI_PATH"
mv /_/*\[sidebar*.(jpg|png|gif|webp|avif|svg) "$UI_PATH"
mv /_/*\[steps*.(jpg|png|gif|webp|avif|svg) "$UI_PATH"
mv /_/*\[buttons*.(jpg|png|gif|webp|avif|svg) "$UI_PATH"
mv /_/*\[step*.(jpg|png|gif|webp|avif|svg) "$UI_PATH"
mv /_/*\[button*.(jpg|png|gif|webp|avif|svg) "$UI_PATH"
mv /_/*\[card*.(jpg|png|gif|webp|avif|svg) "$UI_PATH"
mv /_/*\[app*.(jpg|png|gif|webp|avif|svg) "$UI_PATH"
LOGO_PATH="/Img/identity/"

23
upd.sh
View File

@ -1,10 +1,17 @@
#!/bin/sh
# nix
sudo nix-channel --update
sudo nixos-rebuild switch -I nixos-config=/Cfg/conf.nix
sudo nixos-rebuild boot -I nixos-config=/Cfg/conf.nix
sudo nix-collect-garbage --delete-older-than 14d
# .deb
sudo apt update -y
sudo apt hold 'nvidia-*'
sudo apt upgrade -y
sudo apt-get autoclean -y
sudo apt-get remove --purge -y \
software-properties-common
sudo apt-get autoremove -y
deborphan | xargs sudo apt-get -y remove --purge
sudo apt-get clean -y
# oh-my-zsh
cd ~/.oh-my-zsh/ \
@ -15,3 +22,9 @@ cd ~/.oh-my-zsh/ \
# rust & co
rustup update
cargo install-update -a
# bun
bun upgrade
# deno
deno upgrade