-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·67 lines (57 loc) · 1.24 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
# Requires that Environment folder is located in home directory
if [[ $OSTYPE == 'darwin'* ]]; then
LINUX_SETUP=0
else
echo "Linux Specific Setup..."
LINUX_SETUP=1
fi
function linux_install {
echo "Installing apps"
sudo apt install\
stow\
python3\
python3-setuptools\
vim\
tmux\
minicom\
picocom
}
function mac_install {
echo "Installing apps"
brew install\
python3\
vim\
tmux\
minicom\
picocom\
stow
}
function setup_dirs {
echo
echo "Linking dot files and bin directory"
mkdir $HOME/old_cfg
mv $HOME/.bashrc $HOME/old_cfg
cd $HOME/Environment
stow -v vim\
bash\
tmux\
git\
if ! (ls -a $HOME | grep -qi .bash_local); then
touch $HOME/.bash_local
cat "#!/bin/bash \n # Add extra setup here!" >> $HOME/.bash_local
fi
source $HOME/.bashrc
}
# Mac or linux specific behaviour
if [[ $OSTYPE == 'darwin'* ]]; then
#/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo "Mac Specific Setup..."
#brew install tmux
mac_install
setup_dirs
else
linux_install
setup_dirs
fi
# link all files to home directory.