diff options
Diffstat (limited to 'install')
-rwxr-xr-x | install/ishtar-install | 74 |
1 files changed, 63 insertions, 11 deletions
diff --git a/install/ishtar-install b/install/ishtar-install index 36b937388..a34b1984c 100755 --- a/install/ishtar-install +++ b/install/ishtar-install @@ -118,16 +118,11 @@ do_install() { ;; debian) - MAINBACKS=`cat /etc/apt/sources.list | grep jessie-backports |grep -v "^#"` - ALLBACKS='' - if [ "$(ls -A /etc/apt/sources.list.d/)" ]; then - ALLBACKS=`cat /etc/apt/sources.list.d/* | grep jessie-backports |grep -v "^#"` - fi - if [ "$ALLBACKS" != '' ] || [ "$MAINBACKS" != '' ]; then - backports_activated='true'; - fi dist_version="$(cat /etc/debian_version | sed 's/\/.*//' | sed 's/\..*//')" case "$dist_version" in + 9) + dist_version="stretch" + ;; 8) dist_version="jessie" ;; @@ -135,6 +130,16 @@ do_install() { dist_version="wheezy" ;; esac + set +e + MAINBACKS=`cat /etc/apt/sources.list | grep $dist_version'-backports' |grep -v "^#"` + ALLBACKS='' + if [ "$(ls -A /etc/apt/sources.list.d/)" ]; then + ALLBACKS=`cat /etc/apt/sources.list.d/* | grep $dist_version'-backports' |grep -v "^#"` + fi + set -e + if [ "$ALLBACKS" != '' ] || [ "$MAINBACKS" != '' ]; then + backports_activated='true'; + fi ;; oracleserver) @@ -282,7 +287,7 @@ EOF # Run setup for each distro accordingly case "$lsb_dist" in ubuntu|debian) - if [ "$dist_version" != "jessie" ] && [ "$dist_version" != "wheezy" ]; then + if [ "$dist_version" != "stretch" ] && [ "$dist_version" != "jessie" ] && [ "$dist_version" != "wheezy" ]; then echo "" cecho r " Sorry this script cannot manage your version of Debian/Ubuntu." echo "" @@ -372,9 +377,9 @@ EOF cecho y "Installing Ishtar dependencies" echo ""; ( set -x; $sh_c 'sleep 3; apt-get install -t jessie-backports -y -q python python-django\ - python-django-registration' ) + python-django-registration python-cffi' ) ( set -x; $sh_c 'sleep 3; apt-get install -y -q \ - python-pisa python-bs4 python-django-formtools\ + python-bs4 python-django-formtools libpangocairo-1.0-0 \ python-tidylib python-lxml python-imaging python-html5lib \ python-psycopg2 python-gdal gettext python-unicodecsv memcached \ python-django-extra-views python-memcache python-dbf python-markdown' ) @@ -389,6 +394,53 @@ EOF cecho y "Installing python-ajax-select (available version in Debian is not compatible with backported Django)" echo ""; ( set -x; $sh_c 'pip install django-ajax-selects==1.4.3' ) + cecho y "Installing weasyprint" + echo ""; + ( set -x; $sh_c 'pip install WeasyPrint==0.41' ) + + fi + + if [ "$dist_version" == "stretch" ]; then + if [ "$backports_activated" != 'true' ]; then + echo "" + cecho r " In order to install Ishtar you have to activate Debian backports." + echo " To do that:" + echo "" + echo " echo 'deb http://ftp.debian.org/debian stretch-backports main contrib' >> /etc/apt/sources.list" + echo "" + cecho p " Run again Ishtar installation script after that." + exit 1 + fi + + if [ "$default_db" == '127.0.0.1' ]; then + echo "-------------------------------------------------------------------------------"; + cecho y "Installing postgresql" + echo "" + POSTGIS=postgresql-9.6-postgis-2.3 + ( set -x; $sh_c 'sleep 3; apt-get install -y -q postgresql '$POSTGIS ) + fi + echo "-------------------------------------------------------------------------------"; + cecho y "Installing Ishtar dependencies" + echo ""; + ( set -x; $sh_c 'sleep 3; apt-get install -t stretch-backports -y -q python-django' ) + ( set -x; $sh_c 'sleep 3; apt-get install -y -q \ + python-django-registration libpangocairo-1.0-0 \ + python-bs4 python-django-formtools python-cffi \ + python-tidylib python-lxml python-imaging python-html5lib \ + python-psycopg2 python-gdal gettext python-unicodecsv memcached \ + python-django-extra-views python-memcache python-dbf python-markdown \ + python-reportlab django-ajax-selects python-django-extensions' ) + echo "-------------------------------------------------------------------------------"; + cecho y "Installing django-simple-history" + echo ""; + ( set -x; $sh_c 'pip install git+https://github.com/treyhunner/django-simple-history.git@1.8.2#egg=django-simple-history' ) + echo "-------------------------------------------------------------------------------"; + cecho y "Installing python-secretary" + echo ""; + ( set -x; $sh_c 'pip install secretary==0.2.14' ) + cecho y "Installing weasyprint" + echo ""; + ( set -x; $sh_c 'pip install WeasyPrint==0.41' ) fi ;; |