mirror of
https://github.com/cmur2/python-bme680.git
synced 2024-12-22 12:54:29 +01:00
23 lines
365 B
Bash
23 lines
365 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
printf "BME680 Python Library: Installer\n\n"
|
||
|
|
||
|
if [ $(id -u) -ne 0 ]; then
|
||
|
printf "Script must be run as root. Try 'sudo ./install.sh'\n"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
cd library
|
||
|
|
||
|
printf "Installing for Python 2..\n"
|
||
|
python setup.py install
|
||
|
|
||
|
if [ -f "/usr/bin/python3" ]; then
|
||
|
printf "Installing for Python 3..\n"
|
||
|
python3 setup.py install
|
||
|
fi
|
||
|
|
||
|
cd ..
|
||
|
|
||
|
printf "Done!\n"
|