capitalize "y/n" for clearer intent

If you press enter, `choice` is an empty string and will default to "no". The convention is to capitalize the default answer so users know what happens when they auto-accept prompts.
This commit is contained in:
Matthew Fisher 2018-03-23 16:29:05 -07:00
parent 20823bfc87
commit d3095297c2
No known key found for this signature in database
GPG Key ID: 92AA783CBAAE8E3B

View File

@ -149,7 +149,7 @@ else
fi fi
# Use pm2 control like a service MagicMirror # Use pm2 control like a service MagicMirror
read -p "Do you want use pm2 for auto starting of your MagicMirror (y/n)?" choice read -p "Do you want use pm2 for auto starting of your MagicMirror (y/N)?" choice
if [[ $choice =~ ^[Yy]$ ]]; then if [[ $choice =~ ^[Yy]$ ]]; then
sudo npm install -g pm2 sudo npm install -g pm2
sudo su -c "env PATH=$PATH:/usr/bin pm2 startup linux -u pi --hp /home/pi" sudo su -c "env PATH=$PATH:/usr/bin pm2 startup linux -u pi --hp /home/pi"