|
diff --git a/shenanigans.sh b/shenanigans.sh
|
| ... |
| 45 |
|
45 |
|
| 46 |
# Additional path settings. |
46 |
# Additional path settings. |
| 47 |
|
47 |
|
| 48 |
export PATH=$HOME/Vault/bin:$PATH |
|
|
| 49 |
export PATH=$HOME/Applications:$PATH |
|
|
| 50 |
export PATH=$HOME/.local/bin:$PATH |
48 |
export PATH=$HOME/.local/bin:$PATH |
| 51 |
export PATH=$HOME/go/bin:$PATH |
|
|
| 52 |
export PATH=$HOME/Android/Sdk/platform-tools:$PATH |
|
|
| 53 |
export PATH=$HOME/Android/Sdk/tools:$PATH |
|
|
| 54 |
export PATH=$HOME/Applications/v:$PATH |
|
|
| 55 |
export PATH=$HOME/Applications/odin:$PATH |
|
|
| 56 |
|
49 |
|
| 57 |
# History and search. |
50 |
# History and search. |
| 58 |
|
51 |
|
| ... |
| 70 |
|
63 |
|
| 71 |
# Useful function. Much wow! |
64 |
# Useful function. Much wow! |
| 72 |
|
65 |
|
| 73 |
turtle() { |
|
|
| 74 |
cd ~/Games/Turtle |
|
|
| 75 |
./start.sh |
|
|
| 76 |
} |
|
|
| 77 |
|
|
|
| 78 |
backup() { |
66 |
backup() { |
| 79 |
VHOME=/home/$USER/Vault |
67 |
VHOME=/home/$USER/Vault |
| 80 |
ME=$(whoami)@$(hostname) |
68 |
ME=$(whoami)@$(hostname) |
| ... |
| 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 |
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 |
--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 |
|
|
|
| 143 |
tarball() { |
|
|
| 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 |
} |
|
|