diff options
author | Philip Paquette <pcpaquette@gmail.com> | 2018-09-26 13:35:26 -0400 |
---|---|---|
committer | Philip Paquette <pcpaquette@gmail.com> | 2019-04-18 11:14:56 -0400 |
commit | 7db5011d67a98c05e69d29c5f2ff31314a82bde4 (patch) | |
tree | d0d2c7e16db9e44fe636e701de0b3947fc3b2c91 /run_install_nvm.sh | |
parent | 6187faf20384b0c5a4966343b2d4ca47f8b11e45 (diff) |
Fixed import path, requirements, and MANIFEST
- Added numpy as a requirement (for zobrist hashing)
- Added tests files
- Added MANIFEST.in
Diffstat (limited to 'run_install_nvm.sh')
-rwxr-xr-x | run_install_nvm.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/run_install_nvm.sh b/run_install_nvm.sh new file mode 100755 index 0000000..e2405c1 --- /dev/null +++ b/run_install_nvm.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +# Setting env variables +if [ -z ${NVM_DIR+x} ]; then + export NVM_DIR="$HOME/.nvm" + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" +fi + +# Downloading and install NVM +if [ ! -d "$HOME/.nvm" ]; then + curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh -o install_nvm.sh + bash install_nvm.sh + rm -Rf install_nvm.sh + export NVM_DIR="$HOME/.nvm" + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" + nvm install v8.11.2 + echo "Done installing NVM v0.33.8 and NodeJS v8.11.2" +else + echo "NVM is already installed in ~/.nvm" +fi + +# Installing dependencies +if [ -d "$DIR/diplomacy/web/" ]; then + cd $DIR/diplomacy/web + rm -Rf node_modules + npm install . + npm install . --only=dev + cd - +else + echo "Folder $DIR/diplomacy/web does not exists. Cannot install package.json" +fi |