Read the statement by Michael Teeuw here.
How to update.
-
This post is deleted! -
@izanbard Hello, added a restart of the mirror (via pm2) if an npm install has been done and also added “–production” to the npm install command. Sometimes the module-developer have lot’s of extra stuff added in the package list just for developing. :)
I’m currently now running this script via CRON every night. :)#!/usr/bin/env bash updated=false cd /home/pi/MagicMirror echo "Checking for MagicMirror updates." git fetch if [ $(git rev-parse HEAD) != $(git rev-parse @{u}) ] then echo "Found, updating..." git pull npm install updated=true echo "Update done." else echo "No update needed." fi echo "" cd modules for directory in *; do if [[ -d ${directory} && ${directory} != "node_modules" && ${directory} != "default" ]]; then echo "Checking for ${directory} updates." cd ${directory} git fetch if [ $(git rev-parse HEAD) != $(git rev-parse @{u}) ]; then echo "Found, updating ${directory}..." git pull if [[ -e "package.json" && -f "package.json" ]]; then echo "package.joson changed for ${directory}, installing..." npm install --production updated=true echo "Update done." fi else echo "No update needed." fi echo "" cd .. fi done if $updated; then echo "Restart of MM needed, restarting now." pm2 restart mm fi echo "All done. :)"
-
@izanbard Thank you!!
-
thank u!
-
pi@akpi:~/MagicMirror $ sudo git pull && npm install
Updating 8010e62…5c41e24
error: Your local changes to the following files would be overwritten by merge:
css/main.css
Please, commit your changes or stash them before you can merge.
Aborting
Any ideas… -
This post is deleted! -
This post is deleted! -
@izanbard Thank you.
#!/usr/bin/env bash cd /home/pi/MagicMirror echo "######### CHECKING MAGIC MIRROR ##########"
Has anyone else deployed this script?
When I try to run it as a .py or .sh there is an error on line 6 stating invalid syntax at the end of the first echo row. Any suggestions on clearing this issue?
-
@Unbored
Delete the " and add straight ones again " (If You edited this file via an alternate editor on win/Mac then it might be a cursive "… try it, worked for me! -
hi
i get this message:
error: Your local changes to the following files would be overwritten by merge: modules/default/calendar/calendar.js modules/default/compliments/compliments.js modules/default/newsfeed/newsfeed.js Please, commit your changes or stash them before you can merge. Aborting
what should i do?