forked from RocketChat/Rocket.Chat
/
prepareRocketChat
executable file
·34 lines (25 loc) · 1.32 KB
/
prepareRocketChat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
curl -SLf "https://releases.rocket.chat/3.6.3/download/" -o rocket.chat.tgz
tar xf rocket.chat.tgz --strip 1
cd programs/server
rm -rf npm/node_modules/meteor/emojione_emojione/node_modules/grunt-contrib-qunit
if [[ $(uname -m) == *armv6l* ]] || [[ $(uname -m) == *armv7l* ]]
then
rm -rf npm/node_modules/sharp/vendor
fi
export NODE_ENV=production
npm i
# Ideally this will go away. For some reason on install its installing node-v57-linux-x64-glibc but when actually running it is looking for node-v57-linux-x64-unknown
if [[ $(uname -m) == "x86_64" ]]
then
cp -r npm/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc npm/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-unknown
rm npm/node_modules/grpc/node_modules/tar/lib/.unpack.js.swp
fi
# sharp needs execution stack removed - https://forum.snapcraft.io/t/snap-and-executable-stacks/1812
ls -l npm/node_modules/sharp/vendor
execstack --clear-execstack npm/node_modules/sharp/vendor/lib/librsvg-2.so*
# Having to manually remove because of latest warning
rm -rf npm/node_modules/meteor/konecty_user-presence/node_modules/colors/lib/.colors.js.swp
rm -rf node_modules/node-pre-gyp/node_modules/tar/lib/.mkdir.js.swp
rm -rf npm/node_modules/sharp/node_modules/semver/bin/.semver.js.swp
rm -rf npm/node_modules/tar/lib/.mkdir.js.swp