Fixed an issue where no settings file was created

This commit is contained in:
Ace 2019-02-10 23:42:11 +01:00 committed by GitHub
parent ef5b5c8eff
commit e9aa1b336d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,6 @@ echo -e "\e[1mPlease select an option from below:"
echo -e "\e[97mEnter \e[91m1 \e[97m to update the E-Paper software"
echo -e "\e[97mEnter \e[91m2 \e[97m to install the E-Paper software"
echo -e "\e[97mEnter \e[91m3 \e[97m to uninstall the E-Paper software"
echo -e "\e[1mNote: Updating will back up just the settings.py file."
echo -e "\e[97mConfirm your selection with [ENTER]"
read -r -p 'Waiting for input... ' option
@ -85,6 +84,11 @@ if [ "$option" = 2 ]; then
pip3 install pyowm
pip3 install ics
echo -e "\e[1;36m"Finished installing libraries"\e[0m"
# Making a copy of the sample settings.py file
cd /home/pi/E-Paper-Master/Calendar
cp settings.py.sample settings.py
cd
fi
if [ "$option" = 1 ] || [ "$option" = 2 ]; then
@ -130,8 +134,7 @@ EOF
# Final words
echo -e "\e[1;36m"The install was successful"\e[0m"
echo -e "\e[1;36m"The programm will now start at every boot."\e[0m"
echo -e "\e[1;36m"The programm is set to start at every boot."\e[0m"
echo -e "\e[1;31m"Please enter your details in the file 'settings.py'."\e[0m"
echo -e "\e[1;31m"If this file is not modified, the programm will not start"\e[0m"