-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.sh
More file actions
executable file
·48 lines (35 loc) · 1.22 KB
/
bootstrap.sh
File metadata and controls
executable file
·48 lines (35 loc) · 1.22 KB
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
42
43
44
45
46
47
48
#!/bin/bash
# shellcheck disable=1090
set -eu
printf "Begin Bootstrapping...\n"
export DOTFILES_DIR="$HOME/dotfiles"
export PATHS="$DOTFILES_DIR/zsh/.paths"
[[ ! -f "$PATHS" ]] && printf "error: cannot find PATHS file!\n" && exit 1
# Source Paths
. "$PATHS"
# Create Missing Directories
[[ ! -d "$LOCAL_BIN" ]] && mkdir -p "$LOCAL_BIN"
[[ ! -d "$BACKUPS_DIR" ]] && mkdir -p "$BACKUPS_DIR"
[[ ! -d "$NOTES_DIR" ]] && mkdir -p "$NOTES_DIR"
[[ ! -d "$TMP_DIR" ]] && mkdir -p "$TMP_DIR"
[[ ! -d "$XDG_RUNTIME_DIR" ]] && mkdir -p "$XDG_RUNTIME_DIR"
[[ ! -d "$XDG_CONFIG_HOME" ]] && mkdir -p "$XDG_CONFIG_HOME"
[[ ! -d "$HOME/.cargo" ]] && mkdir -p "$HOME/.cargo"
[[ ! -f "$HOME/.cargo/env" ]] && touch "$HOME/.cargo/env"
# Install GNU Stow to manage Symlinks
sudo apt update
sudo apt install stow
# Install required packages and programs
sudo apt install -y python3 python3-pip
sudo apt install -y software-properties-common
sudo add-apt-repository --yes --update ppa:ansible/ansible
sudo apt install -y ansible
ansible-playbook --ask-become-pass bootstrap.yml
#=============
# Configuration Files
#=============
# Create Symlinks
[[ -f "$HOME/.zshrc" ]] && rm -if "$HOME/.zshrc"
stow zsh
stow linux-tmux
printf "\nFinished Bootstrapping!\n\n"