-
Notifications
You must be signed in to change notification settings - Fork 0
/
installscript
88 lines (73 loc) · 2.34 KB
/
installscript
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
80
81
82
83
84
85
86
87
#!/bin/bash
# Install some basic system requirements
sudo apt update
sudo apt install curl fontconfig wget nginx bash-completion vim unzip -y
# Symlink bashrc
ln -s $HOME/.dotfiles/shell/.bashrc $HOME/.bashrc
# Symlink vimrc
ln -s $HOME/.dotfiles/shell/.vimrc $HOME/.vimrc
# Symlink fonts
if [ -d "$HOME/.fonts" ];
then
rm $HOME/.fonts
fi
ln -s $HOME/.dotfiles/fonts $HOME/.fonts
ln -s $HOME/.dotfiles/fonts /usr/share/fonts
# Symlink and configure global gitignore
ln -s $HOME/.dotfiles/shell/.gitignore-global $HOME/.gitignore-global
git config --global core.excludesfile $HOME/.gitignore-global
git config --global core.editor "vim"
echo '--------------'
echo 'Configure font'
echo '--------------'
fc-cache -f -v
echo '-----------'
echo 'Install FNM'
echo '-----------'
cd $HOME
curl -fsSL https://fnm.vercel.app/install | bash -s -- --skip-shell
cd $HOME/.dotfiles
echo '-----------'
echo 'Install PHP'
echo '-----------'
sudo apt install php php-dev php-fpm -y
echo '----------------'
echo 'Install composer'
echo '----------------'
EXPECTED_COMPOSER_CHECKSUM="$(curl https://composer.github.io/installer.sig)"
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_COMPOSER_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
if [ "$EXPECTED_COMPOSER_CHECKSUM" != "$ACTUAL_COMPOSER_CHECKSUM" ]
then
>&2 echo 'ERROR: Invalid installer checksum'
rm composer-setup.php
exit 1
fi
php composer-setup.php
rm composer-setup.php
sudo mv composer.phar /usr/local/bin/composer
sudo chmod 755 /usr/local/bin/composer
echo '-------------'
echo 'Install redis'
echo '-------------'
sudo apt install redis -y
echo '-------------'
echo 'Install Nginx'
echo '-------------'
sudo apt install nginx -y
echo '---------------'
echo 'Install Mailpit'
echo '---------------'
sudo bash < <(curl -sL https://raw.githubusercontent.com/axllent/mailpit/develop/install.sh)
echo '-------------'
echo 'Install Ngrok'
echo '-------------'
cd
curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc | sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null
echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | sudo tee /etc/apt/sources.list.d/ngrok.list
sudo apt update
sudo apt install ngrok
echo '------------'
echo 'Install Rust'
echo '------------'
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path -y