aboutsummaryrefslogtreecommitdiff
path: root/stuff/scripts/system/backup
diff options
context:
space:
mode:
authoriceyrazor <iceyfoxservers@gmail.com>2024-11-24 04:50:59 -0600
committericeyrazor <iceyfoxservers@gmail.com>2024-11-24 04:50:59 -0600
commit0b274c969e824b4bcf328e3272b8894143f3a683 (patch)
tree3b4860beb1c10f68a06d84453ac55b52f327b641 /stuff/scripts/system/backup
reinit 3. git reset --hard was not right. thanks ai
Diffstat (limited to 'stuff/scripts/system/backup')
-rwxr-xr-xstuff/scripts/system/backup/backup.sh30
-rwxr-xr-xstuff/scripts/system/backup/copy-to-git.sh21
2 files changed, 51 insertions, 0 deletions
diff --git a/stuff/scripts/system/backup/backup.sh b/stuff/scripts/system/backup/backup.sh
new file mode 100755
index 0000000..16559d1
--- /dev/null
+++ b/stuff/scripts/system/backup/backup.sh
@@ -0,0 +1,30 @@
+cd ~/
+
+fsynca () {
+ # t?
+ rsync -RUurvn --size-only --delete-after $exclude $syncfile "$target"
+}
+
+fsyncb () {
+ printf "===confirm changes?\n"
+ read -p "y/n: " uinput
+ if [ "$uinput" != "n" ] && [ "$uinput" != "N" ]; then
+ printf "\n\n\n"
+ rsync -PRUurv --size-only --delete-after $exclude $syncfile "$target"
+ printf "\n===end sync\n---------\n\n"
+ fi
+}
+
+syncfile="stuff .bash_profile .bashrc .surf .wezterm.lua .tmux.conf .gtkrc-2.0 .profile .urlview .vimrc .xinitrc .Xresources .zshrc .newsboat .gnupg .ssh .local/bin/lf-gadgets .config/dwm .config/awesome .config/gtk-3.0 .config/rofi .config/lf .config/picom.conf .config/nvim .config/screenkey.json .config/vesktop/themes .keepass .config/Pinta"
+
+#sync game stuff
+target="/home/iceyrazor/mnt-backups/LINUX FILES/home/iceyrazor"
+exclude="--exclude **/cc-survival --exclude node_modules --exclude dontsync --exclude **/iceys-linux-stuffs"
+
+
+fsynca
+
+printf "==CC-survival unsynced\n\n"
+
+fsyncb
+
diff --git a/stuff/scripts/system/backup/copy-to-git.sh b/stuff/scripts/system/backup/copy-to-git.sh
new file mode 100755
index 0000000..ad2a42d
--- /dev/null
+++ b/stuff/scripts/system/backup/copy-to-git.sh
@@ -0,0 +1,21 @@
+cd ~/
+
+fsync () {
+ rsync -RUurvn --size-only --delete-after $exclude $syncfile "$target"
+ printf "===commit these changes?\n"
+ read -p "y/n: " uinput
+ if [ "$uinput" != "n" ] && [ "$uinput" != "N" ]; then
+ printf "\n\n\n"
+ rsync -PRUurv --size-only --delete-after $exclude $syncfile "$target"
+ printf "\n===end sync\n---------\n\n"
+ fi
+}
+
+syncfile=".bash_profile .bashrc .gtkrc-2.0 .wezterm.lua .profile .urlview .vimrc .Xresources .zshrc .config/dwm .config/awesome .config/rofi .config/lf .config/picom.conf .config/nvim .config/screenkey.json stuff/manual-programs/suckless"
+
+syncfile="$syncfile stuff/scripts/system/stbar stuff/scripts/system/url-handler.sh stuff/scripts/system/backup/copy-to-git.sh stuff/scripts/system/backup/backup.sh"
+syncfile="$syncfile stuff/scripts/system/neoboot.sh stuff/scripts/system/math.sh stuff/scripts/system/bri.sh stuff/scripts/system/restart-pipe.sh stuff/scripts/system/set-pri-java.sh"
+target=~/stuff/iceys-linux-stuffs
+exclude="--exclude check_weth.sh --exclude lua-ls-cc-tweaked --exclude .config/nvim/plugin"
+
+fsync