-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinstall
executable file
·67 lines (52 loc) · 1.68 KB
/
install
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
GREEN="\033[32m"
YELLOW="\033[33m"
BLUE="\033[34m"
RED="\033[31m"
ENDCOLOR="\033[0m"
set -e
sudo echo "" # force password entry early
# OSX Command Line Tools
if ! xcode-select -p &> /dev/null; then
xcode-select --install
fi
if [ ! -e "$HOME/.dotfiles" ]; then
echo -e "${YELLOW}Cloning the dotfiles repo...${ENDCOLOR}"
git clone --recurse-submodules -j2 https://github.com/jondavidjohn/dotfiles.git $HOME/.dotfiles
echo ""
fi
cd ~/.dotfiles
# Homebrew Install
if ! command -v brew &> /dev/null; then
echo -e "${YELLOW}Installing Homebrew...${ENDCOLOR}"
NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
eval "$(/opt/homebrew/bin/brew shellenv)"
brew analytics off
echo ""
fi
# Homebrew Bundle Install
if [ ! -e "$HOME/.brew-bundle-installed" ]; then
echo -e "${YELLOW}Homebrew Bundle...${ENDCOLOR}"
brew tap Homebrew/bundle && brew bundle && touch "$HOME/.brew-bundle-installed"
echo ""
fi
eval "$(jenv init -)"
jenv add '/Library/Java/JavaVirtualMachines/temurin-20.jdk/Contents/Home/'
echo ''
echo -e "${YELLOW}Setting default shell to bash...${ENDCOLOR}"
echo '/opt/homebrew/bin/bash' | sudo tee -a /etc/shells
sudo chsh -s '/opt/homebrew/bin/bash'
echo -e "${YELLOW}H4cking the plan3t...${ENDCOLOR}"
mkdir -p $HOME/.config/karabiner
current_directory="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
find "$current_directory/home" -depth 1 |
while read location; do
name=$(basename "$location")
if [ -d "$HOME/$name" ]; then
rm -rf "$HOME/$name"
fi
ln -nsf "$location" "$HOME/$name"
echo -e " Linked ${BLUE}$name${ENDCOLOR}"
done
echo ""
touch $HOME/.bash_secrets
source $HOME/.bash_profile