Added proposed changes by @mojodna

pull/66/head
Piero Toffanin 2016-12-14 09:06:04 -05:00
rodzic fbee45c08c
commit d6ef80986f
3 zmienionych plików z 15 dodań i 13 usunięć

Wyświetl plik

@ -4,6 +4,6 @@ class Migration(migrations.Migration):
dependencies = [("app", "0001_initial")]
operations = [
migrations.RunSQL("SET postgis.enable_outdb_rasters TO True;"),
migrations.RunSQL("SET postgis.gdal_enabled_drivers TO 'GTiff';")
migrations.RunSQL("ALTER SYSTEM SET postgis.enable_outdb_rasters TO True;"),
migrations.RunSQL("ALTER SYSTEM SET postgis.gdal_enabled_drivers TO 'GTiff';")
]

Wyświetl plik

@ -18,7 +18,7 @@ almost_there(){
# 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
if [ $? -ne 0 ]; 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
@ -27,7 +27,7 @@ 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
if [ $? -ne 0 ]; 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

Wyświetl plik

@ -1,12 +1,16 @@
#!/bin/bash
set -eo pipefail
platform="Linux" # Assumed
uname=`uname`
if [[ $uname == "Darwin" ]]; then
platform = "MacOS / OSX"
elif [[ $uname == MINGW* ]]; then
platform = "Windows"
fi
uname=$(uname)
case $uname in
"Darwin")
platform="MacOS / OSX"
;;
MINGW*)
platform="Windows"
;;
esac
usage(){
echo "Usage: $0 <command> [options]"
@ -30,9 +34,7 @@ check_command(){
echo -e "Checking for $1... $check_msg"
if [[ $not_found ]]; then
exit 1
fi
return 1
}
environment_check(){