fix tabs, remove extra spaces and lines.

This commit is contained in:
Rodrigo Ramírez Norambuena
2016-12-29 22:23:08 -03:00
parent 4237d0c7e3
commit 19d906c5e4
17 changed files with 75 additions and 77 deletions

View File

@@ -49,19 +49,19 @@ if command_exists node; then
echo -e "\e[0mMinimum Node version: \e[1m$NODE_TESTED\e[0m" echo -e "\e[0mMinimum Node version: \e[1m$NODE_TESTED\e[0m"
echo -e "\e[0mInstalled Node version: \e[1m$NODE_CURRENT\e[0m" echo -e "\e[0mInstalled Node version: \e[1m$NODE_CURRENT\e[0m"
if version_gt $NODE_TESTED $NODE_CURRENT; then if version_gt $NODE_TESTED $NODE_CURRENT; 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."
exit; exit;
fi fi
else else
echo -e "\e[92mNo Node.js upgrade nessecery.\e[0m" echo -e "\e[92mNo Node.js upgrade nessecery.\e[0m"
fi fi
else else
@@ -116,27 +116,27 @@ fi
# Check if plymouth is installed (default with PIXEL desktop environment), then install custom splashscreen. # Check if plymouth is installed (default with PIXEL desktop environment), then install custom splashscreen.
echo -e "\e[96mCheck plymouth installation ...\e[0m" echo -e "\e[96mCheck plymouth installation ...\e[0m"
if command_exists plymouth; then if command_exists plymouth; then
THEME_DIR="/usr/share/plymouth/themes" THEME_DIR="/usr/share/plymouth/themes"
echo -e "\e[90mSplashscreen: Checking themes directory.\e[0m" echo -e "\e[90mSplashscreen: Checking themes directory.\e[0m"
if [ -d $THEME_DIR ]; then if [ -d $THEME_DIR ]; then
echo -e "\e[90mSplashscreen: Create theme directory if not exists.\e[0m" echo -e "\e[90mSplashscreen: Create theme directory if not exists.\e[0m"
if [ ! -d $THEME_DIR/MagicMirror ]; then if [ ! -d $THEME_DIR/MagicMirror ]; then
sudo mkdir $THEME_DIR/MagicMirror sudo mkdir $THEME_DIR/MagicMirror
fi fi
if sudo cp ~/MagicMirror/splashscreen/splash.png $THEME_DIR/MagicMirror/splash.png && sudo cp ~/MagicMirror/splashscreen/MagicMirror.plymouth $THEME_DIR/MagicMirror/MagicMirror.plymouth && sudo cp ~/MagicMirror/splashscreen/MagicMirror.script $THEME_DIR/MagicMirror/MagicMirror.script; then if sudo cp ~/MagicMirror/splashscreen/splash.png $THEME_DIR/MagicMirror/splash.png && sudo cp ~/MagicMirror/splashscreen/MagicMirror.plymouth $THEME_DIR/MagicMirror/MagicMirror.plymouth && sudo cp ~/MagicMirror/splashscreen/MagicMirror.script $THEME_DIR/MagicMirror/MagicMirror.script; then
echo -e "\e[90mSplashscreen: Theme copied successfully.\e[0m" echo -e "\e[90mSplashscreen: Theme copied successfully.\e[0m"
if sudo plymouth-set-default-theme -R MagicMirror; then if sudo plymouth-set-default-theme -R MagicMirror; then
echo -e "\e[92mSplashscreen: Changed theme to MagicMirror successfully.\e[0m" echo -e "\e[92mSplashscreen: Changed theme to MagicMirror successfully.\e[0m"
else else
echo -e "\e[91mSplashscreen: Couldn't change theme to MagicMirror!\e[0m" echo -e "\e[91mSplashscreen: Couldn't change theme to MagicMirror!\e[0m"
fi fi
else else
echo -e "\e[91mSplashscreen: Copying theme failed!\e[0m" echo -e "\e[91mSplashscreen: Copying theme failed!\e[0m"
fi fi
else else
echo -e "\e[91mSplashscreen: Themes folder doesn't exist!\e[0m" echo -e "\e[91mSplashscreen: Themes folder doesn't exist!\e[0m"
fi fi
else else
echo -e "\e[93mplymouth is not installed.\e[0m"; echo -e "\e[93mplymouth is not installed.\e[0m";
fi fi

View File

@@ -117,7 +117,7 @@ The getScripts method is called to request any additional scripts that need to b
getScripts: function() { getScripts: function() {
return [ return [
'script.js', // will try to load it from the vendor folder, otherwise it will load is from the module folder. 'script.js', // will try to load it from the vendor folder, otherwise it will load is from the module folder.
'moment.js', // this file is available in the vendor folder, so it doesn't need to be available in the module folder. 'moment.js', // this file is available in the vendor folder, so it doesn't need to be available in the module folder.
this.file('anotherfile.js'), // this file will be loaded straight from the module folder. this.file('anotherfile.js'), // this file will be loaded straight from the module folder.
'https://code.jquery.com/jquery-2.2.3.min.js', // this file will be loaded from the jquery servers. 'https://code.jquery.com/jquery-2.2.3.min.js', // this file will be loaded from the jquery servers.
] ]

View File

@@ -35,7 +35,6 @@ Module.register("alert",{
}, },
show_notification: function(message) { show_notification: function(message) {
if (this.config.effect == "slide") {this.config.effect = this.config.effect + "-" + this.config.position;} if (this.config.effect == "slide") {this.config.effect = this.config.effect + "-" + this.config.position;}
msg = ""; msg = "";
if (message.title) { if (message.title) {
msg += "<span class='thin' style='line-height: 35px; font-size:24px' color='#4A4A4A'>" + message.title + "</span>"; msg += "<span class='thin' style='line-height: 35px; font-size:24px' color='#4A4A4A'>" + message.title + "</span>";

View File

@@ -355,4 +355,3 @@ Module.register("weatherforecast",{
return parseFloat(temperature).toFixed(decimals); return parseFloat(temperature).toFixed(decimals);
} }
}); });