Transitional fix for new LTR559 library
[EVA-2020-02-2.git] / uninstall.sh
index 0709cc0625f12119b9b596838f5ce14317d61cfe..e3174449709c8bf884d6d599c446351fd3e437ca 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
-LIBRARY_VERSION=`cat library/setup.py | grep version | awk -F"'" '{print $2}'`
-LIBRARY_NAME=`cat library/setup.py | grep name | awk -F"'" '{print $2}'`
+LIBRARY_VERSION=`cat library/setup.cfg | grep version | awk -F" = " '{print $2}'`
+LIBRARY_NAME=`cat library/setup.cfg | grep name | awk -F" = " '{print $2}'`
 
 printf "$LIBRARY_NAME $LIBRARY_VERSION Python Library: Uninstaller\n\n"
 
@@ -22,4 +22,12 @@ fi
 
 cd ..
 
+printf "Disabling serial..\n"
+# Enable serial terminal over /dev/ttyAMA0
+raspi-config nonint do_serial 0
+# Disable serial port
+raspi-config nonint set_config_var enable_uart 0 /boot/config.txt
+# Switch serial port back to miniUART
+sed -i 's/^dtoverlay=pi3-miniuart-bt # for Enviro+/#dtoverlay=pi3-miniuart-bt # for Enviro+/' /boot/config.txt
+
 printf "Done!\n"