-
Notifications
You must be signed in to change notification settings - Fork 1
/
install_vue.sh
51 lines (48 loc) · 1.69 KB
/
install_vue.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
#!/bin/bash
# Check if brew was installed !
command -v brew > /dev/null;
check_brew=$?;
if [ $check_brew -eq 0 ]; then
echo "\033[032mBrew is good installed !!\033[0m";
echo "\033[33mUpdate of Brew starts...\033[0m";
brew update > /dev/null;
echo "\033[032mBrew is good updated !!\033[0m";
else
echo "\033[031mBrew is not installed !\033[0m";
echo "\033[33mBrew installation starts...\033[0m";
rm -rf $HOME/.brew > /dev/null;
git clone --depth=1 https://github.com/Homebrew/brew $HOME/.brew > /dev/null;
echo 'export PATH=$HOME/.brew/bin:$PATH' >> $HOME/.zshrc > /dev/null;
source $HOME/.zshrc;
brew update > /dev/null;
echo "\033[032mBrew is good installed and updated !!\033[0m";
fi
echo "\033[38;5;206m---------------------------\033[0m";
# Check if npm was installed in local dir !
command -v npm > /dev/null;
check_npm=$?;
if [ $check_npm -eq 0 ]; then
echo "\033[032mNpm is good installed !!\033[0m";
echo "\033[33mUpdate of Npm starts...\033[0m";
npm update > /dev/null;
echo "\033[032mNpm is good updated !!\033[0m";
else
echo "\033[31mNpm is not installed !!\033[0m";
echo "\033[33mNpm installation starts...\033[0m";
brew install npm > /dev/null;
npm update > /dev/null;
echo "\033[032mNpm is good installed and updated !!\033[0m";
fi
echo "\033[38;5;206m---------------------------\033[0m";
# Check if VueJs was installed !
command -v vue > /dev/null;
check_vue=$?;
if [ $check_vue -eq 0 ]; then
echo "\033[032mVue-js is good installed !!\033[0m";
else
echo "\033[31mVue-js is not installed !!\033[0m";
echo "\033[33mVue-js installation starts...\033[0m";
npm install -g vue-cli > /dev/null;
source $HOME/.zshrc > /dev/null;
echo "\033[032mVue-js is good installed and updated !!\033[0m";
fi