/[projects]/misc/xoa-installer/xoa-installer.sh
ViewVC logotype

Diff of /misc/xoa-installer/xoa-installer.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2962 by torben, Mon Feb 29 10:09:34 2016 UTC revision 2990 by torben, Mon Mar 28 16:40:48 2016 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2    
3    
4  # npm install -g npm@next  # Note: this script works on debian 7/wheezy and debian 8/jessie
5    #
6    # If running on a raspberry 1(A/B) raspian/wheezy - downgrade node.js to 5.4.0
7    # Please note that raspian/wheezy for arm defaults to gcc 4.6
8    # gcc 4.7 is needed for compiling node-js modules
9    
 #BRANCH=next-release  
10  BRANCH=master  BRANCH=master
11    
12    
# Line 37  if [ "$1" == "clean" ] ; then Line 40  if [ "$1" == "clean" ] ; then
40          echo cleaning .forever          echo cleaning .forever
41          rm -rf .forever          rm -rf .forever
42          rm -rf forever.log          rm -rf forever.log
43            
44    
45          echo done          echo done
46          exit          exit
# Line 54  if [ ! -x "/usr/bin/gcc" ] ; then Line 57  if [ ! -x "/usr/bin/gcc" ] ; then
57          apt-get install  build-essential || exit          apt-get install  build-essential || exit
58  fi  fi
59    
60    if [ ! -f "/usr/include/libpng12/png.h" ] ; then
61            echo "installing libpng"
62            apt-get install libpng12-dev || exit
63    fi
64    
65  if [ ! -x "/usr/bin/redis-server" ] ; then  if [ ! -x "/usr/bin/redis-server" ] ; then
66          echo "installing redis-server"          echo "installing redis-server"
67          apt-get install  redis-server || exit          apt-get install  redis-server || exit
68  fi  fi
69            
70    if [ ! -x "/usr/bin/git" ] ; then
71            echo "installing git"
72            apt-get install git || exit
73    fi
74    
75    
76  if [ ! -x "/usr/local/bin/n" ] ; then  if [ ! -x "/usr/local/bin/n" ] ; then
77          echo "installing node.js bootstrap"          echo "installing node.js bootstrap"
# Line 73  fi Line 86  fi
86    
87  if [ ! -x "/usr/local/bin/gulp" ] ; then  if [ ! -x "/usr/local/bin/gulp" ] ; then
88          echo "installing gulp"          echo "installing gulp"
89          npm install -g gulp          npm install -g gulp || exit
90    fi
91    
92    if [ ! -x "/usr/local/bin/forever" ] ; then
93            echo "installing forever"
94            npm install -g forever || exit
95  fi  fi
96    
97    if [ ! -x "/usr/local/bin/node-gyp" ] ; then
98            echo "installing node-gyp"
99            npm install -g node-gyp || exit
100    fi
101    
102    if [ ! -d "/usr/local/lib/node_modules/bcrypt" ] ; then
103            echo "installing bcrypt"
104            npm install -g bcrypt || exit
105    fi
106    
107  if [ ! -d "xo-web" ] ; then  if [ ! -d "xo-web" ] ; then
108          git clone -b $BRANCH https://github.com/vatesfr/xo-web.git          git clone -b $BRANCH https://github.com/vatesfr/xo-web.git
# Line 111  npm install --unsafe-perm || exit Line 137  npm install --unsafe-perm || exit
137  npm run build || exit  npm run build || exit
138  cd ..  cd ..
139    
140    if [ ! -f "/etc/xo-server/config.yaml" ] ; then
141            if  [ ! -d "/etc/xo-server" ] ; then
142                    mkdir /etc/xo-server
143            fi
144    
145            echo "please setup /etc/xo-server/config.yaml"
146            exit
147    fi
148    
149  restartxo  restartxo
150    
151    

Legend:
Removed from v.2962  
changed lines
  Added in v.2990

  ViewVC Help
Powered by ViewVC 1.1.20