Skip to content

Commit

Permalink
Add -e to echo
Browse files Browse the repository at this point in the history
  • Loading branch information
BB-BenBridges authored Nov 8, 2018
1 parent 83353b3 commit 804d7c4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .build/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

if [ -n ${1+x} ]; then
mac=$1
echo "MAC given as '$mac'"
echo -e "\033[33m--MAC given as $mac--\033[0m"
fi

echo -e "\033[33m--Setting up diyHue--\033[0m"
Expand Down Expand Up @@ -32,18 +32,18 @@ fi
cd /opt/hue-emulator

if [ $3 == "true" ]; then
echo "\033[33m--Debug set to $3, enabling debug--\033[0m"
echo -e "\033[33m--Debug set to $3, enabling debug--\033[0m"
sed -i "s|debug = .* #|debug = True # |g" /opt/hue-emulator/HueEmulator3.py
else
echo "\033[33m--Debug set to $3, disabling debug--\033[0m"
echo -e "\033[33m--Debug set to $3, disabling debug--\033[0m"
sed -i "s|debug = .* #|debug = False # |g" /opt/hue-emulator/HueEmulator3.py
fi

echo -e "\033[32m--Startup complete. Open Hue app and search for bridges--\033[0m"
if [ -z $1 -a -z $2 ]; then
echo "\033[32m--Starting without provided MAC & IP--\033[0m"
echo -e "\033[32m--Starting without provided MAC & IP--\033[0m"
exec python3 /opt/hue-emulator/HueEmulator3.py
else
echo "\033[32m--Starting with provided MAC & IP--\033[0m"
echo -e "\033[32m--Starting with provided MAC & IP--\033[0m"
exec python3 /opt/hue-emulator/HueEmulator3.py $1 $2
fi

0 comments on commit 804d7c4

Please sign in to comment.