ubuntugis repository for gdal 2.1 dependency, gdal version check in start.sh

pull/66/head
Piero Toffanin 2016-12-12 14:09:25 -05:00
rodzic a108640fcb
commit bec65c4780
2 zmienionych plików z 17 dodań i 2 usunięć

Wyświetl plik

@ -18,6 +18,7 @@ RUN git submodule init
RUN git submodule update RUN git submodule update
# Install Node.js + other packages # Install Node.js + other packages
RUN add-apt-repository ppa:ubuntugis/ubuntugis-unstable && apt-get update
RUN curl --silent --location https://deb.nodesource.com/setup_6.x | bash - RUN curl --silent --location https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get install -y nodejs binutils libproj-dev gdal-bin RUN apt-get install -y nodejs binutils libproj-dev gdal-bin

Wyświetl plik

@ -9,17 +9,31 @@ echo "|__/|__/\___/_.___/\____/_____/_/ /_/ "
echo echo
echo -e "\e[39m" echo -e "\e[39m"
python -c "import sys;ret = 1 if sys.version_info <= (3, 0) else 0;print('Checking python version... ' + ('3.x, good!' if ret == 0 else '2.x'));sys.exit(ret);" almost_there(){
if [ $? -eq 1 ]; then
echo echo
echo "====================" echo "===================="
echo "You're almost there!" echo "You're almost there!"
echo "====================" echo "===================="
}
# Check python version
python -c "import sys;ret = 1 if sys.version_info <= (3, 0) else 0;print('Checking python version... ' + ('3.x, good!' if ret == 0 else '2.x'));sys.exit(ret);"
if [ $? -eq 1 ]; then
almost_there
echo -e "\e[33mYour system is currently using Python 2.x. You need to install or configure your system to use Python 3.x. Check out http://docs.python-guide.org/en/latest/dev/virtualenvs/ for information on how to setup Python 3.x alongside your Python 2.x install.\e[39m" echo -e "\e[33mYour system is currently using Python 2.x. You need to install or configure your system to use Python 3.x. Check out http://docs.python-guide.org/en/latest/dev/virtualenvs/ for information on how to setup Python 3.x alongside your Python 2.x install.\e[39m"
echo echo
exit exit
fi fi
# Check GDAL version
python -c "import sys;import re;import subprocess;version = subprocess.Popen([\"gdalinfo\", \"--version\"], stdout=subprocess.PIPE).communicate()[0].decode().rstrip();ret = 0 if re.compile('^GDAL [2-9]\.[1-9]+').match(version) else 1; print('Checking GDAL version... ' + ('{}, excellent!'.format(version) if ret == 0 else version));sys.exit(ret);"
if [ $? -eq 1 ]; then
almost_there
echo -e "\e[33mYour system is currently using a version of GDAL that is too old, or GDAL is not installed. You need to install or configure your system to use GDAL 2.1 or higher. If you have installed multiple versions of GDAL, make sure the newer one takes priority in your PATH environment variable.\e[39m"
echo
exit
fi
echo Building asssets... echo Building asssets...
webpack webpack