mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 20:22:53 +00:00
Update installer.
This commit is contained in:
parent
a4c3d9cb17
commit
a88e4932e6
@ -14,23 +14,26 @@
|
|||||||
# This is an installer script for MagicMirror2. It works well enough
|
# This is an installer script for MagicMirror2. It works well enough
|
||||||
# that it can detect if you have Node installed, run a binary script
|
# that it can detect if you have Node installed, run a binary script
|
||||||
# and then download and run MagicMirror2.
|
# and then download and run MagicMirror2.
|
||||||
|
|
||||||
|
echo "Installing helper tools ..."
|
||||||
sudo apt-get install curl wget build-essential unzip || exit
|
sudo apt-get install curl wget build-essential unzip || exit
|
||||||
ARM=$(uname -m) # Determine which Pi is running.
|
ARM=$(uname -m) # Determine which Pi is running.
|
||||||
NODE_LATEST="v5.10.1" # Set the latest version here.
|
NODE_LATEST="v5.10.1" # Set the latest version here.
|
||||||
DOWNLOAD_URL="https://nodejs.org/dist/latest/node-$NODE_LATEST-linux-$ARM.tar.gz" # Construct the download URL.
|
DOWNLOAD_URL="https://nodejs.org/dist/latest/node-$NODE_LATEST-linux-$ARM.tar.gz" # Construct the download URL.
|
||||||
|
|
||||||
|
echo "Installing Latest Node.js ..."
|
||||||
|
mkdir ~/.MagicMirrorInstaller || exit
|
||||||
|
cd ~/.MagicMirrorInstaller || exit
|
||||||
wget $DOWNLOAD_URL || exit # Download the file given.
|
wget $DOWNLOAD_URL || exit # Download the file given.
|
||||||
tar xvf node-$NODE_LATEST-linux-$ARM.tar.gz || exit
|
tar xvf node-$NODE_LATEST-linux-$ARM.tar.gz || exit
|
||||||
cd node* || exit
|
cd node* || exit
|
||||||
sudo cp -R * /usr/local || exit
|
sudo cp -R * /usr/local || exit
|
||||||
cd .. || exit
|
cd ~ || exit
|
||||||
rm -rf node* || exit
|
rm -Rf ~/.MagicMirrorInstaller || exit
|
||||||
# Run Node checks to make sure Node works properly.
|
|
||||||
(curl -sL https://deb.nodesource.com/test | bash -) || exit
|
echo "Cloning MagicMirror ..."
|
||||||
npm config set loglevel info
|
git clone -b v2-beta https://github.com/MichMich/MagicMirror.git || exit
|
||||||
if [ ! -f package.json ]; then
|
cd MagicMirror || exit
|
||||||
wget https://github.com/nhubbard/MagicMirror/archive/v2-beta.zip
|
|
||||||
unzip v2-beta.zip
|
|
||||||
cd MagicMirror-2-beta
|
|
||||||
fi
|
|
||||||
npm install || exit
|
npm install || exit
|
||||||
echo "We're ready! Run `npm start` from the MagicMirror-2-beta directory (not over SSH) and enjoy MagicMirror2!"
|
echo ""
|
||||||
|
echo "We're ready! Run `DISPLAY=:0 npm start` from the MagicMirror directory.
|
Loading…
x
Reference in New Issue
Block a user