/[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 2989 by torben, Mon Mar 28 15:43:06 2016 UTC revision 2991 by torben, Mon Mar 28 21:28:47 2016 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2    
3    
4  # Note: this script works on debian 7 /wheezy  # Note: this script works on debian 7/wheezy and debian 8/jessie
 # I haven't yet managed to get it to work on deb8/jessie  
5  #  #
6  # If running on a raspberry 1(A/B) raspian/wheezy - downgrade node.js to 5.4.0  # 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  # Please note that raspian/wheezy for arm defaults to gcc 4.6
# Line 41  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 72  if [ ! -x "/usr/bin/git" ] ; then Line 71  if [ ! -x "/usr/bin/git" ] ; then
71          echo "installing git"          echo "installing git"
72          apt-get install git || exit          apt-get install git || exit
73  fi  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 126  fi Line 125  fi
125  # xo-server  # xo-server
126  echo "building xo-server"  echo "building xo-server"
127  cd xo-server  cd xo-server
128  npm install || exit          npm install || exit
129  npm run build || exit          npm run build || exit
130    
131            #for some reasone leveldown  fails occasionally on arm/raspberry pi
132            if [ ! -d "/root/xo-server/node_modules/leveldown/build" ] ; then
133                    pushd node_modules/leveldown
134                    node-gyp configure || exit
135                    node-gyp build || exit
136                    popd
137            fi
138  cd ..  cd ..
139    
140    
141    
142  #xo-web  #xo-web
143  echo "building xo-web"  echo "building xo-web"
144  cd xo-web  cd xo-web
145  npm install --unsafe-perm || exit          npm install --unsafe-perm || exit
146  npm run build || exit          npm run build || exit
147  cd ..  cd ..
148    
149  if [ ! -f "/etc/xo-server/config.yaml" ] then  
150    if [ ! -f "/etc/xo-server/config.yaml" ] ; then
151            if  [ ! -d "/etc/xo-server" ] ; then
152                    mkdir /etc/xo-server
153            fi
154    
155          echo "please setup /etc/xo-server/config.yaml"          echo "please setup /etc/xo-server/config.yaml"
156          exit          exit
157  fi  fi

Legend:
Removed from v.2989  
changed lines
  Added in v.2991

  ViewVC Help
Powered by ViewVC 1.1.20