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

View File

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

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 > 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 /_/*\[part*.(jpg|png|gif|webp|avif|svg) "$UI_PATH"
mv /_/*\[section*.(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 /_/*\[sidebar*.(jpg|png|gif|webp|avif|svg) "$UI_PATH"
mv /_/*\[steps*.(jpg|png|gif|webp|avif|svg) "$UI_PATH" mv /_/*\[step*.(jpg|png|gif|webp|avif|svg) "$UI_PATH"
mv /_/*\[buttons*.(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/" LOGO_PATH="/Img/identity/"

23
upd.sh
View File

@ -1,10 +1,17 @@
#!/bin/sh #!/bin/sh
# nix # .deb
sudo nix-channel --update sudo apt update -y
sudo nixos-rebuild switch -I nixos-config=/Cfg/conf.nix sudo apt hold 'nvidia-*'
sudo nixos-rebuild boot -I nixos-config=/Cfg/conf.nix sudo apt upgrade -y
sudo nix-collect-garbage --delete-older-than 14d
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 # oh-my-zsh
cd ~/.oh-my-zsh/ \ cd ~/.oh-my-zsh/ \
@ -15,3 +22,9 @@ cd ~/.oh-my-zsh/ \
# rust & co # rust & co
rustup update rustup update
cargo install-update -a cargo install-update -a
# bun
bun upgrade
# deno
deno upgrade