-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
36 lines (30 loc) · 1.54 KB
/
install.sh
File metadata and controls
36 lines (30 loc) · 1.54 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
#!/bin/bash
# install and setup oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
ln -s "$(pwd)/zsh/.zshrc" "$HOME/.zshrc"
ls -s "$(pwd)/zsh/thibsy.zsh-theme" "$HOME/.oh-my-zsh/themes/thibsy.zsh-theme"
# install and setup homebrew
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
/opt/homebrew/bin/brew bundle install --file="$(pwd)/brew/bundle"
mkdir -p "/opt/homebrew/etc/homebrew"
ln -s "$(pwd)/brew/brew.env" "/opt/homebrew/etc/homebrew/brew.env"
# setup git
ln -s "$(pwd)/git/.gitconfig" "$HOME/.gitconfig"
ln -s "$(pwd)/git/.gitignore" "$HOME/.gitignore"
ALLOWED_SIGNERS_FILE="$HOME/.config/git/allowed_signers"
if [ ! -f "$ALLOWED_SIGNERS_FILE" ]; then
echo "$(git config --get user.email) namespaces=\"git\" $(cat git config --get user.signingKey)" >> "$ALLOWED_SIGNERS_FILE"
fi
# setup visual studio code
rm "$HOME/Library/Application Support/Code/User/settings.json"
ln -s "$(pwd)/vscode/settings.json" "$HOME/Library/Application Support/Code/User/settings.json"
rm "$HOME/Library/Application Support/Code/User/keybindings.json"
ln -s "$(pwd)/vscode/keybindings.json" "$HOME/Library/Application Support/Code/User/keybindings.json"
# setup all php versions
php_versions=("7.4" "8.0" "8.1" "8.2" "8.3" "8.4")
for version in "${php_versions[@]}"; do
# we cannot symlink this file; it will not be recognised by php.
cp "$(pwd)/php/php.ini" "/opt/homebrew/etc/php/${version}/conf.d/10-defaults.ini"
done
# setup nano
ln -s "$(pwd)/nano/.nanorc" "$HOME/.nanorc"