Skip to content

Instantly share code, notes, and snippets.

@michbeck100
Created December 28, 2018 11:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michbeck100/a1461ce692d969e24c5149b557ca8102 to your computer and use it in GitHub Desktop.
Save michbeck100/a1461ce692d969e24c5149b557ca8102 to your computer and use it in GitHub Desktop.
#!/bin/sh
INSTALL_DIR=pimatic-test
PIMATIC_DIR=$INSTALL_DIR/node_modules/pimatic
mkdir ${INSTALL_DIR}
npm install pimatic-mobile-frontend@test --prefix ${INSTALL_DIR}
sed -i -e 's/"pimatic": "0\.9\.\*"//g' ${INSTALL_DIR}/node_modules/pimatic-mobile-frontend/package.json
npm install pimatic@test --prefix ${INSTALL_DIR} --production
sed -i -e 's/0\.9\.44-a/0.9.44/g' ${PIMATIC_DIR}/package.json
wget https://raw.githubusercontent.com/pimatic/pimatic/master/ppm.js
chmod +x ppm.js
mv ppm.js ${PIMATIC_DIR}/ppm.js
cp ${PIMATIC_DIR}/config_default.json ${INSTALL_DIR}/config.json
sed -i -e 's/"port": 80/"port": 8080/g' ${INSTALL_DIR}/config.json
sed -i -e 's/"password": ""/"password": "admin"/g' ${INSTALL_DIR}/config.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment