2016-11-08 16:59:30 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -eo pipefail
|
|
|
|
|
|
|
|
[ "$(uname -s)" != "Darwin" ] && exit
|
|
|
|
|
|
|
|
. dependencies.list
|
|
|
|
|
2017-09-18 22:07:28 +00:00
|
|
|
#use existing server if same version
|
|
|
|
if [ -f node_modules/realm-object-server/package.json ]; then
|
|
|
|
if grep -q "\"version\": \"$REALM_OBJECT_SERVER_VERSION\"" node_modules/realm-object-server/package.json; then
|
|
|
|
rm -rf realm-object-server-data
|
|
|
|
rm -rf realm-object-server
|
2016-11-08 16:59:30 +00:00
|
|
|
exit
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2017-09-18 22:07:28 +00:00
|
|
|
echo "Installing realm-object-server version: " $REALM_OBJECT_SERVER_VERSION
|
|
|
|
npm install realm-object-server@$REALM_OBJECT_SERVER_VERSION
|