Last active
October 14, 2016 16:31
-
-
Save UlisesGascon/eb476f5a77fee78563bc0302632cd648 to your computer and use it in GitHub Desktop.
Instalador automático de Visualizer para c9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
colorPrint () { | |
echo "$(tput setaf 1) $(tput setab 7) Visualizer Installer $(tput sgr 0) $(tput setaf 3) $(tput bold) $1 $(tput setaf 7)" | |
} | |
colorPrint "Welcome, $C9_FULLNAME!" | |
colorPrint "You are installing King of App Visualizer in C9.io..." | |
colorPrint "1. Let's check your system (Node & Npm)..." | |
node_version=`node --version` | |
npm_version=`npm --version` | |
if [[ -z "$node_version" ]] | |
then echo "Node Version Error!" | |
exit | |
fi | |
colorPrint "2. Let's fix SUDO issue..." | |
echo "export NODE_PATH=$NODE_PATH:/home/ubuntu/.nvm/versions/node/$node_version/lib/node_modules" >> ~/.bashrc && source ~/.bashrc | |
colorPrint "3. Let's update NPM..." | |
npm update -g npm | |
colorPrint "4. Let's install global npm dependencies..." | |
colorPrint "- Gulp..." | |
npm install -g gulp | |
colorPrint "- Grunt..." | |
npm install -g grunt | |
colorPrint "- Bower..." | |
npm install -g bower | |
colorPrint "- Yeoman..." | |
npm install -g yo | |
colorPrint "5. Let's check all the dependencies..." | |
yo doctor | |
colorPrint "6. Let's install Visualizer..." | |
git clone -b dev https://git@github.com/KingofApp/com.kingofapp.visualizer.git | |
colorPrint "7. Let's customize Gruntfile.js..." | |
cd /home/ubuntu/workspace/com.kingofapp.visualizer | |
wget -q https://gist.githubusercontent.com/UlisesGascon/54acff02948964554726708f04a25937/raw/f51688a3b5c029d7e5a73dbf157930c744769339/Gruntfile.js -O Gruntfile.js | |
colorPrint "8. Let's customize gulp-tasks/serve.js..." | |
cd /home/ubuntu/workspace/com.kingofapp.visualizer/gulp-tasks/ | |
wget -q https://gist.githubusercontent.com/UlisesGascon/54acff02948964554726708f04a25937/raw/0a19b5dc072f0ee4dcd36abe8d2a79d3575c0dba/serve.js -O serve.js | |
colorPrint "9. Let's install the global tools." | |
colorPrint "- Module Generator..." | |
npm install -g generator-koapp-module | |
colorPrint "- Spinner Generator..." | |
npm install -g generator-koapp-spinner | |
colorPrint "- Theme Generator..." | |
npm install -g generator-koa-theme | |
colorPrint "10. Let's start the server!" | |
# url="https://$C9_PROJECT-$C9_USER.c9users.io" | |
# colorPrint "REMINDER: Use this address $url to connect." | |
cd /home/ubuntu/workspace/com.kingofapp.visualizer/ | |
npm start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment