aboutsummaryrefslogtreecommitdiff
path: root/shenanigans.sh
diff options
context:
space:
mode:
Diffstat (limited to 'shenanigans.sh')
-rwxr-xr-xshenanigans.sh60
1 files changed, 0 insertions, 60 deletions
diff --git a/shenanigans.sh b/shenanigans.sh
index 677cb12..4833bd2 100755
--- a/shenanigans.sh
+++ b/shenanigans.sh
@@ -45,14 +45,7 @@ alias d='cd ~/Downloads'
45 45
46# Additional path settings. 46# Additional path settings.
47 47
48export PATH=$HOME/Vault/bin:$PATH
49export PATH=$HOME/Applications:$PATH
50export PATH=$HOME/.local/bin:$PATH 48export PATH=$HOME/.local/bin:$PATH
51export PATH=$HOME/go/bin:$PATH
52export PATH=$HOME/Android/Sdk/platform-tools:$PATH
53export PATH=$HOME/Android/Sdk/tools:$PATH
54export PATH=$HOME/Applications/v:$PATH
55export PATH=$HOME/Applications/odin:$PATH
56 49
57# History and search. 50# History and search.
58 51
@@ -70,11 +63,6 @@ if [[ $- =~ .i. ]]; then bind '"\C-h": "\C-a hstr -- \C-j"'; fi
70 63
71# Useful function. Much wow! 64# Useful function. Much wow!
72 65
73turtle() {
74 cd ~/Games/Turtle
75 ./start.sh
76}
77
78backup() { 66backup() {
79 VHOME=/home/$USER/Vault 67 VHOME=/home/$USER/Vault
80 ME=$(whoami)@$(hostname) 68 ME=$(whoami)@$(hostname)
@@ -87,10 +75,8 @@ backup() {
87 cp /home/$USER/.bash_history_infinite bash_history_infinite 75 cp /home/$USER/.bash_history_infinite bash_history_infinite
88 cp /home/$USER/.smbcredentials smbcredentials 76 cp /home/$USER/.smbcredentials smbcredentials
89 cp /home/$USER/.gitconfig gitconfig 77 cp /home/$USER/.gitconfig gitconfig
90 cp /home/$USER/.s3cfg s3cfg
91 78
92 cp /home/$USER/.vimrc vimrc 79 cp /home/$USER/.vimrc vimrc
93 cp /home/$USER/.config/emacs/init.el init.el
94 cp /home/$USER/.config/helix/config.toml config.toml 80 cp /home/$USER/.config/helix/config.toml config.toml
95 cp /home/$USER/.newsboat/urls urls 81 cp /home/$USER/.newsboat/urls urls
96 cp /home/$USER/.newsboat/cache.db cache.db 82 cp /home/$USER/.newsboat/cache.db cache.db
@@ -101,20 +87,6 @@ backup() {
101 dconf dump /com/gexperts/Tilix/ > tilix.dconf 87 dconf dump /com/gexperts/Tilix/ > tilix.dconf
102 # dconf load /com/gexperts/Tilix/ < tilix.dconf 88 # dconf load /com/gexperts/Tilix/ < tilix.dconf
103 89
104 # Backup screenshots.
105 mkdir -p $VHOME/pictures
106 cp -rfn ~/Pictures/* $VHOME/pictures/
107
108 # Backup screencasts.
109 mkdir -p $VHOME/videos
110 cp -rfn ~/Videos/* $VHOME/videos/
111
112 # Backup Turtle WoW stuff.
113 mkdir -p $VHOME/turtle-wow
114 cp -rfn ~/Games/Turtle/Interface $VHOME/turtle-wow/
115 cp -rfn ~/Games/Turtle/WTF $VHOME/turtle-wow/
116 cp -rfn ~/Games/Turtle/start.sh $VHOME/turtle-wow/
117
118 # Sync with NAS. 90 # Sync with NAS.
119 rsync -azv \ 91 rsync -azv \
120 --exclude '.venv/' \ 92 --exclude '.venv/' \
@@ -125,38 +97,6 @@ backup() {
125 --delete \ 97 --delete \
126 $VHOME/ /media/Void/Backup/$ME/ 98 $VHOME/ /media/Void/Backup/$ME/
127 99
128 # Sync to off-site DO S3 bucket.
129 s3cmd sync \
130 --host-bucket=vault \
131 --delete-removed \
132 --exclude 'node_modules/*' \
133 --exclude '.git/*' \
134 --exclude '.import/*' \
135 --exclude '.godot/*' \
136 --exclude '.venv/*' \
137 $VHOME/ s3://vault/backup/$ME/
138
139 # Add to log file. 100 # Add to log file.
140 echo `date +"%D %T"` >> ~/.vault.log 101 echo `date +"%D %T"` >> ~/.vault.log
141} 102}
142
143tarball() {
144 echo $1
145 if [ -z "$1" ]; then
146 echo "No arguments provided. Usage: tarball <git-folder>"
147 return
148 fi
149
150 if [ ! -d "$1" ]; then
151 echo "Directory $1 does not exist."
152 return
153 fi
154
155 cwd=$(pwd)
156 pname=$(basename "$1")
157 cdate=$(date "+%Y%m%d%H%M")
158
159 cd $1
160 git archive --format=tar -o "/tmp/$pname-$cdate.tar.gz" -v HEAD
161 cd $cwd
162}