-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·52 lines (45 loc) · 1.35 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
52
#!/bin/bash
unameOutput="$(uname -s)"
case "${unameOutput}" in
Linux*) machine=Linux;;
Darwin*) machine=Mac;;
CYGWIN*) machine=Cygwin;;
MINGW*) machine=MinGw;;
*) machine="UNKNOWN:${unameOutput}"
esac
echo Machine type is ${machine}
read -p "Do you want to symlink dotfiles? (y/n) " should_link_dotfiles
if [ $should_link_dotfiles = 'y' ]
then
echo "Linking dotfiles..."
source scripts/link_dotfiles.sh
source config/nvim-lua/link_lua_conf.sh
fi
read -p "Do you want to symlink executables? (y/n) " should_link_executables
if [ $should_link_executables = 'y' ]
then
echo "Linking bin executables..."
source scripts/link_executables.sh
fi
read -p "Do you want to set up git meta? (y/n) " should_set_up_git_meta
if [ $should_set_up_git_meta = 'y' ]
then
echo "Setting up git meta..."
source scripts/git.sh
fi
read -p "Do you want run install script for $machine? (y/n) " should_install_script
if [ $should_install_script = 'y' ]
then
# Linux specific install
if [ "$machine" == "Linux" ]; then
echo -e "\nRunning install script on linux"
source scripts/linux-install.sh
fi
# macOS specific install
if [ "$machine" == "Mac" ]; then
echo -e "\n\nRunning install script on macOS"
source scripts/brew.sh
source scripts/macos_defaults.sh
fi
fi
echo "install.sh script finished. Reload your terminal."