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 { |
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 |
|
|
150 |
if [ ! -f "/etc/xo-server/config.yaml" ] ; then |
if [ ! -f "/etc/xo-server/config.yaml" ] ; then |
151 |
if [ ! -d "/etc/xo-server" ] ; then |
if [ ! -d "/etc/xo-server" ] ; then |
152 |
mkdir /etc/xo-server |
mkdir /etc/xo-server |