mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 12:12:20 +00:00
Merge pull request #747 from roramirez/comment-bash-installer
Fix format comments on installer script
This commit is contained in:
commit
03f15e0075
@ -21,10 +21,10 @@ echo -e "\e[0m"
|
|||||||
# Define the tested version of Node.js.
|
# Define the tested version of Node.js.
|
||||||
NODE_TESTED="v5.1.0"
|
NODE_TESTED="v5.1.0"
|
||||||
|
|
||||||
#Determine which Pi is running.
|
# Determine which Pi is running.
|
||||||
ARM=$(uname -m)
|
ARM=$(uname -m)
|
||||||
|
|
||||||
#Check the Raspberry Pi version.
|
# Check the Raspberry Pi version.
|
||||||
if [ "$ARM" != "armv7l" ]; then
|
if [ "$ARM" != "armv7l" ]; then
|
||||||
echo -e "\e[91mSorry, your Raspberry Pi is not supported."
|
echo -e "\e[91mSorry, your Raspberry Pi is not supported."
|
||||||
echo -e "\e[91mPlease run MagicMirror on a Raspberry Pi 2 or 3."
|
echo -e "\e[91mPlease run MagicMirror on a Raspberry Pi 2 or 3."
|
||||||
@ -32,7 +32,7 @@ if [ "$ARM" != "armv7l" ]; then
|
|||||||
exit;
|
exit;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#define helper methods.
|
# Define helper methods.
|
||||||
function version_gt() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1"; }
|
function version_gt() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1"; }
|
||||||
function command_exists () { type "$1" &> /dev/null ;}
|
function command_exists () { type "$1" &> /dev/null ;}
|
||||||
|
|
||||||
@ -56,8 +56,8 @@ if command_exists node; then
|
|||||||
echo -e "\e[96mNode should be upgraded.\e[0m"
|
echo -e "\e[96mNode should be upgraded.\e[0m"
|
||||||
NODE_INSTALL=true
|
NODE_INSTALL=true
|
||||||
|
|
||||||
#Check if a node process is currenlty running.
|
# Check if a node process is currenlty running.
|
||||||
#If so abort installation.
|
# If so abort installation.
|
||||||
if pgrep "node" > /dev/null; then
|
if pgrep "node" > /dev/null; then
|
||||||
echo -e "\e[91mA Node process is currently running. Can't upgrade."
|
echo -e "\e[91mA Node process is currently running. Can't upgrade."
|
||||||
echo "Please quit all Node processes and restart the installer."
|
echo "Please quit all Node processes and restart the installer."
|
||||||
@ -78,9 +78,9 @@ if $NODE_INSTALL; then
|
|||||||
|
|
||||||
echo -e "\e[96mInstalling Node.js ...\e[90m"
|
echo -e "\e[96mInstalling Node.js ...\e[90m"
|
||||||
|
|
||||||
#Fetch the latest version of Node.js from the selected branch
|
# Fetch the latest version of Node.js from the selected branch
|
||||||
#The NODE_STABLE_BRANCH variable will need to be manually adjusted when a new branch is released. (e.g. 7.x)
|
# The NODE_STABLE_BRANCH variable will need to be manually adjusted when a new branch is released. (e.g. 7.x)
|
||||||
#Only tested (stable) versions are recommended as newer versions could break MagicMirror.
|
# Only tested (stable) versions are recommended as newer versions could break MagicMirror.
|
||||||
|
|
||||||
NODE_STABLE_BRANCH="6.x"
|
NODE_STABLE_BRANCH="6.x"
|
||||||
curl -sL https://deb.nodesource.com/setup_$NODE_STABLE_BRANCH | sudo -E bash -
|
curl -sL https://deb.nodesource.com/setup_$NODE_STABLE_BRANCH | sudo -E bash -
|
||||||
@ -88,7 +88,7 @@ if $NODE_INSTALL; then
|
|||||||
echo -e "\e[92mNode.js installation Done!\e[0m"
|
echo -e "\e[92mNode.js installation Done!\e[0m"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Install magic mirror
|
# Install MagicMirror
|
||||||
cd ~
|
cd ~
|
||||||
if [ -d "$HOME/MagicMirror" ] ; then
|
if [ -d "$HOME/MagicMirror" ] ; then
|
||||||
echo -e "\e[93mIt seems like MagicMirror is already installed."
|
echo -e "\e[93mIt seems like MagicMirror is already installed."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user