1 |
|
2 |
|
3 | # ----------------------------------------------------------------------------
|
4 | # | qewd: Script for enabling QEWD on IRIS Community Edition |
|
5 | # | |
|
6 | # | Copyright (c) 2017-19 M/Gateway Developments Ltd, |
|
7 | # | Redhill, Surrey UK. |
|
8 | # | All rights reserved. |
|
9 | # | |
|
10 | # | http://www.mgateway.com |
|
11 | # | Email: rtweed@mgateway.com |
|
12 | # | |
|
13 | # | |
|
14 | # | Licensed under the Apache License, Version 2.0 (the "License"); |
|
15 | # | you may not use this file except in compliance with the License. |
|
16 | # | You may obtain a copy of the License at |
|
17 | # | |
|
18 | # | http://www.apache.org/licenses/LICENSE-2.0 |
|
19 | # | |
|
20 | # | Unless required by applicable law or agreed to in writing, software |
|
21 | # | distributed under the License is distributed on an "AS IS" BASIS, |
|
22 | # | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
23 | # | See the License for the specific language governing permissions and |
|
24 | # | limitations under the License. |
|
25 | # ----------------------------------------------------------------------------
|
26 |
|
27 | # 28 November 2019
|
28 |
|
29 | # Install Node.js Using NVM
|
30 |
|
31 | apt-get update
|
32 | apt-get install -y build-essential python-minimal curl subversion git
|
33 |
|
34 |
|
35 | if [ -f "/usr/bin/node" ]; then
|
36 |
|
37 | echo "Node.js appears to have already been installed - aborting"
|
38 |
|
39 | else
|
40 |
|
41 | VERSION=${1:-12}
|
42 |
|
43 | # Node.js
|
44 |
|
45 | echo 'Installing Node.js'
|
46 |
|
47 | cd ~
|
48 |
|
49 | curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
|
50 | export NVM_DIR="$HOME/.nvm"
|
51 | [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
|
52 | nvm install $VERSION
|
53 |
|
54 | echo 'Node.js has been installed. Check by typing: node -v'
|
55 |
|
56 | ln -s /usr/irissys/bin /ISC/dur/bin
|
57 |
|
58 | # Now install the mgsql routines
|
59 |
|
60 | svn export https://github.com/chrisemunt/mgsql/trunk/m /ISC/qewd-install/m
|
61 |
|
62 | export LD_LIBRARY_PATH="/usr/irissys/bin"
|
63 |
|
64 | cd /ISC/qewd-install
|
65 | npm install
|
66 | node install_mgsql
|
67 |
|
68 | fi
|