-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·51 lines (41 loc) · 1.48 KB
/
install.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
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
COLOR_RESET="$(tput sgr0)"
COLOR_GREEN="$(tput setaf 2)"
COLOR_RED="$()"
printf "%s%s%s\n\n" $COLOR_GREEN "Installing dot-files" $COLOR_RESET
printf "%s%s%s\n" $COLOR_GREEN "1. Setting up directories" $COLOR_RESET
CONFIG_DIR="$HOME/.config"
CACHE_DIR="$HOME/.cache"
DATA_DIR="$HOME/.local/share"
BIN_DIR="$HOME/.local/bin"
HOME_DIR="$HOME"
mkdir -vp ${CONFIG_DIR}
mkdir -vp ${DATA_DIR}
mkdir -vp ${CACHE_DIR}
mkdir -vp ${BIN_DIR}
mkdir -vp "${CACHE_DIR}zsh/"
mkdir -vp "${DATA_DIR}/nvim/undodir"
export XDG_CONFIG_HOME=${CONFIG_DIR}
export XDG_DATA_HOME=${DATA_DIR}
export XDG_CACHE_HOME=${CACHE_DIR}
packages="zsh alacritty neovim tmux"
#dev_packages="python3" # add all development packages
config=("alacritty/", "nvim/", "tmux/", "zsh/")
bins=(".local/bin/scripts/")
home=(".zshenv")
# (check if current dir is dot-files) git clone this repo: https://github.com/lukasnxyz/dot-files
# check if laptop and if so, install auto-cpufreq?
printf "%s%s%s\n" $COLOR_GREEN "2. Installing packages: ${packages}" $COLOR_RESET
sudo apt-get update
sudo apt-get install -y ${packages} # Ubuntu(apt), Arch(pacman), Fedora(dnf)
printf "%s%s%s\n" $COLOR_GREEN "3. Installing configuration files" $COLOR_RESET
for c in "${config[@]%,}"
do
cp -v -r ${c} ${CONFIG_DIR} # !!!commas after each is messing up
done
for c in "${home[@]}"
do
cp -v -r ${c} ${HOME_DIR} # !!!commas after each is messing up
done
printf "%s%s%s\n" $COLOR_GREEN "4. Changing default shell to zsh" $COLOR_RESET
chsh -s /usr/bin/zsh