UNPKG

804 Bapplication/x-shView Raw
1#!/usr/bin/env bash
2
3# run using: source install_nodem.sh
4
5# Acknowledgement: Wladimir Mutel for NodeM configuration logic
6
7echo 'Installing NodeM'
8
9npm install nodem
10
11sudo ln -sf $gtm_dist/libgtmshr.so /usr/local/lib/
12sudo ldconfig
13base=$1
14[ -f "$GTMCI" ] || export GTMCI="$(find $base -iname nodem.ci)"
15nodemgtmr="$(find $base -iname v4wnode.m | tail -n1 | xargs dirname)"
16echo "$gtmroutines" | fgrep "$nodemgtmr" || export gtmroutines="$nodemgtmr $gtmroutines"
17
18echo 'base='$1 >> ~/.profile
19echo '[ -f "$GTMCI" ] || export GTMCI="$(find $base -iname nodem.ci)"' >> ~/.profile
20echo 'nodemgtmr="$(find $base -iname v4wnode.m | tail -n1 | xargs dirname)"' >> ~/.profile
21echo 'echo "$gtmroutines" | fgrep "$nodemgtmr" || export gtmroutines="$nodemgtmr $gtmroutines"' >> ~/.profile
22
23echo 'NodeM Installed'