/[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 2990 by torben, Mon Mar 28 16:40:48 2016 UTC revision 3109 by torben, Wed Aug 31 09:12:33 2016 UTC
# Line 7  Line 7 
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
8  # gcc 4.7 is needed for compiling node-js modules  # gcc 4.7 is needed for compiling node-js modules
9    
10  BRANCH=master  BRANCH=stable
11    
12    
13  function restartxo {  function restartxo {
# Line 25  if [ "$1" == "clean" ] ; then Line 25  if [ "$1" == "clean" ] ; then
25          echo cleaning xo-web          echo cleaning xo-web
26          rm -rf xo-web          rm -rf xo-web
27    
28            echo cleaning xo-web-v4
29            rm -rf xo-web-v4
30    
31          echo cleaning xo-server          echo cleaning xo-server
32          rm -rf xo-server          rm -rf xo-server
33    
# Line 112  else Line 115  else
115          cd ..          cd ..
116  fi  fi
117    
118    if [ ! -d "xo-web-v4" ] ; then
119            git clone -b $BRANCH https://github.com/vatesfr/xo-web.git xo-web-v4
120            cd xo-web-v4
121            git checkout tags/v4.16.0
122            cd ..
123    fi
124    
125  if [ ! -d "xo-server" ] ; then  if [ ! -d "xo-server" ] ; then
126          git clone -b $BRANCH https://github.com/vatesfr/xo-server.git          git clone -b $BRANCH https://github.com/vatesfr/xo-server.git
# Line 125  fi Line 134  fi
134  # xo-server  # xo-server
135  echo "building xo-server"  echo "building xo-server"
136  cd xo-server  cd xo-server
137  npm install || exit          npm install || exit
138  npm run build || exit          npm run build || exit
139    
140            #for some reasone leveldown  fails occasionally on arm/raspberry pi
141            if [ ! -d "/root/xo-server/node_modules/leveldown/build" ] ; then
142                    pushd node_modules/leveldown
143                    node-gyp configure || exit
144                    node-gyp build || exit
145                    popd
146            fi
147  cd ..  cd ..
148    
149    
150    
151  #xo-web  #xo-web
152  echo "building xo-web"  echo "building xo-web"
153  cd xo-web  cd xo-web
154  npm install --unsafe-perm || exit          #npm install --unsafe-perm || exit
155  npm run build || exit          npm install || exit
156            npm run build || exit
157    cd ..
158    
159    #xo-web-v4
160    echo "building xo-web-v4"
161    cd xo-web-v4
162            npm install || exit
163            npm run build || exit
164  cd ..  cd ..
165    
166    
167    
168    if [ ! -f xo-web/dist/styles/main.css ] ; then
169            mkdir xo-web/dist/styles
170            mkdir xo-web/dist/images
171    
172            cp xo-web-v4/dist/styles/main.css xo-web/dist/styles/main.css
173            cp xo-web-v4/dist/images/logo_small.png xo-web/dist/images/logo_small.png
174    fi
175    
176    
177  if [ ! -f "/etc/xo-server/config.yaml" ] ; then  if [ ! -f "/etc/xo-server/config.yaml" ] ; then
178          if  [ ! -d "/etc/xo-server" ] ; then          if  [ ! -d "/etc/xo-server" ] ; then
179                  mkdir /etc/xo-server                  mkdir /etc/xo-server
# Line 146  if [ ! -f "/etc/xo-server/config.yaml" ] Line 183  if [ ! -f "/etc/xo-server/config.yaml" ]
183          exit          exit
184  fi  fi
185    
186  restartxo  #restartxo
187    
188    

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

  ViewVC Help
Powered by ViewVC 1.1.20