-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.sh
executable file
·80 lines (66 loc) · 2.29 KB
/
init.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
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
#===============================================================================
#
# FILE: init.sh
#
# USAGE: ./init.sh
#
# DESCRIPTION:
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: YOUR NAME (),
# ORGANIZATION:
# CREATED: 08/01/2019 08:05:48 PM
# REVISION: ---
#===============================================================================
set -o nounset # Treat unset variables as an error
echo "Updating..."
sudo yum update -y
echo -e "\n\n\nInstalling git, py, devel..."
sudo yum install -y git python3 gcc-c++ make cmake python3-devel cowsay fortune-mod epel-release
echo -e "\n\n\nInstalling git-completion..."
wget https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
echo -e "\n\n\nInstalling good ipcalc..."
if [ -d /opt/ipcalc-0.41 ] || type ipcalc; then
echo "ipcal already installed"
else
cd /opt/ || exit
sudo wget http://jodies.de/ipcalc-archive/ipcalc-0.41.tar.gz
sudo tar -xzvf ipcalc-0.41.tar.gz
cd - || exit
fi
echo -e "\n\n\nInstalling pip..."
python3 -m ensurepip --user
#pip3 install flake8 pylint ansible-lint bashate --user
echo -e "\n\n\nInstalling npm..."
if type npm; then
echo "NPM already exists"
else
curl -sL https://rpm.nodesource.com/setup_10.x | sudo -E bash -
sudo yum install nodejs -y
fi
echo -e "\n\n\nInstalling fancy diff..."
sudo npm install -g diff-so-fancy
CURDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" || exit; pwd -P)"
echo -e "\n\n\n"
read -n 1 -r -p "Create vim symlinks [ $CURDIR -> ~ ]? (y/N): "
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
ln -s "$CURDIR"/.vimrc ~
fi
echo -e "\n\n\n"
read -n 1 -r -p "Install pkmn terminal? (y/N): "
if [[ $REPLY =~ ^[Yy]$ ]]; then
sudo npm install -g pokemon-terminal
fi
echo -e "\n\n\nInstalling vim plug..."
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
echo -e "\n\n\nInstalling pyenv..."
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
cd ~/.pyenv && src/configure && make -C src
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc