-
Notifications
You must be signed in to change notification settings - Fork 0
/
update_dotfiles.sh
executable file
·41 lines (31 loc) · 1.76 KB
/
update_dotfiles.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
set -e
set -x
DOTFILES_DIR="/home/mid3ee/CodeWorks/gitHub/myrepos/dotArch"
mkdir -p "$DOTFILES_DIR/fastfetch"
mkdir -p "$DOTFILES_DIR/hypr"
mkdir -p "$DOTFILES_DIR/kitty"
mkdir -p "$DOTFILES_DIR/nvim"
mkdir -p "$DOTFILES_DIR/bin"
mkdir -p "$DOTFILES_DIR/waybar"
mkdir -p "$DOTFILES_DIR/swaync"
mkdir -p "$DOTFILES_DIR/VSCodium/User" # Create the directory for VSCodium settings
touch "$DOTFILES_DIR/VSCodium/User/settings.json" # Create the settings.json file
touch "$DOTFILES_DIR/VSCodium/User/keybindings.json" # Create the keybindings.json file
rsync -av --delete "$HOME/.tmux.conf" "$DOTFILES_DIR/tmux.conf"
rsync -av --delete --exclude '.git' "$HOME/.config/fastfetch/" "$DOTFILES_DIR/fastfetch/"
rsync -av --delete --exclude '.git' "$HOME/.local/bin/" "$DOTFILES_DIR/bin/"
rsync -av --delete --exclude '.git' "$HOME/.config/hypr/" "$DOTFILES_DIR/hypr/"
rsync -av --delete --exclude '.git' "$HOME/.config/swaync/" "$DOTFILES_DIR/swaync/"
rsync -av --delete --exclude '.git' "$HOME/.config/kitty/" "$DOTFILES_DIR/kitty/"
rsync -av --delete --exclude '.git' "$HOME/.config/nvim/" "$DOTFILES_DIR/nvim/"
rsync -av --delete --exclude '.git' "$HOME/.config/waybar/" "$DOTFILES_DIR/waybar/"
rsync -av --delete --exclude '.git' "$HOME/.config/VSCodium/User/settings.json" "$DOTFILES_DIR/VSCodium/User/settings.json"
rsync -av --delete --exclude '.git' "$HOME/.config/VSCodium/User/keybindings.json" "$DOTFILES_DIR/VSCodium/User/keybindings.json"
rsync -av --delete --exclude '.git' "$HOME/.local/bin/update_dotfiles.sh" "$DOTFILES_DIR/update_dotfiles.sh"
rsync -av --delete --exclude '.git' "$HOME/.zshrc" "$DOTFILES_DIR/zshrc"
cd "$DOTFILES_DIR"
git add --all
read -p "Enter commit message: " commit_message
git commit -m "$commit_message"
git push origin main