/[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 2959 by torben, Mon Feb 29 09:49:28 2016 UTC revision 2989 by torben, Mon Mar 28 15:43:06 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
5    # I haven't yet managed to get it to work on deb8/jessie
6    #
7    # If running on a raspberry 1(A/B) raspian/wheezy - downgrade node.js to 5.4.0
8    # Please note that raspian/wheezy for arm defaults to gcc 4.6
9    # gcc 4.7 is needed for compiling node-js modules
10    
 #BRANCH=next-release  
11  BRANCH=master  BRANCH=master
12    
13    
# Line 49  if [ ! -x "/usr/bin/curl" ] ; then Line 53  if [ ! -x "/usr/bin/curl" ] ; then
53          apt-get install curl || exit          apt-get install curl || exit
54  fi  fi
55    
56    if [ ! -x "/usr/bin/gcc" ] ; then
57            echo "installing build-essential"
58            apt-get install  build-essential || exit
59    fi
60    
61    if [ ! -f "/usr/include/libpng12/png.h" ] ; then
62            echo "installing libpng"
63            apt-get install libpng12-dev || exit
64    fi
65    
66    if [ ! -x "/usr/bin/redis-server" ] ; then
67            echo "installing redis-server"
68            apt-get install  redis-server || exit
69    fi
70    
71    if [ ! -x "/usr/bin/git" ] ; then
72            echo "installing git"
73            apt-get install git || exit
74    fi
75            
76    
77  if [ ! -x "/usr/local/bin/n" ] ; then  if [ ! -x "/usr/local/bin/n" ] ; then
78          echo "installing node.js bootstrap"          echo "installing node.js bootstrap"
79          curl -o /usr/local/bin/n https://raw.githubusercontent.com/visionmedia/n/master/bin/n || exit          curl -o /usr/local/bin/n https://raw.githubusercontent.com/visionmedia/n/master/bin/n || exit
# Line 62  fi Line 87  fi
87    
88  if [ ! -x "/usr/local/bin/gulp" ] ; then  if [ ! -x "/usr/local/bin/gulp" ] ; then
89          echo "installing gulp"          echo "installing gulp"
90          npm install -x gulp          npm install -g gulp || exit
91    fi
92    
93    if [ ! -x "/usr/local/bin/forever" ] ; then
94            echo "installing forever"
95            npm install -g forever || exit
96  fi  fi
97    
98    if [ ! -x "/usr/local/bin/node-gyp" ] ; then
99            echo "installing node-gyp"
100            npm install -g node-gyp || exit
101    fi
102    
103    if [ ! -d "/usr/local/lib/node_modules/bcrypt" ] ; then
104            echo "installing bcrypt"
105            npm install -g bcrypt || exit
106    fi
107    
108  if [ ! -d "xo-web" ] ; then  if [ ! -d "xo-web" ] ; then
109          git clone -b $BRANCH https://github.com/vatesfr/xo-web.git          git clone -b $BRANCH https://github.com/vatesfr/xo-web.git
# Line 100  npm install --unsafe-perm || exit Line 138  npm install --unsafe-perm || exit
138  npm run build || exit  npm run build || exit
139  cd ..  cd ..
140    
141    if [ ! -f "/etc/xo-server/config.yaml" ] then
142            echo "please setup /etc/xo-server/config.yaml"
143            exit
144    fi
145    
146  restartxo  restartxo
147    
148    

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

  ViewVC Help
Powered by ViewVC 1.1.20