diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-05-01 15:54:14 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-05-01 15:54:14 +0200 | 
| commit | fa7f111bcf0255f428ba12d200ece6c85524d315 (patch) | |
| tree | 6eebc1137911e34790208a4a672cd11bb2b691d0 | |
| parent | fe898772278cc606f50d292b1ef8b02dba5b0c82 (diff) | |
| download | Ishtar-fa7f111bcf0255f428ba12d200ece6c85524d315.tar.bz2 Ishtar-fa7f111bcf0255f428ba12d200ece6c85524d315.zip | |
Update main ishtar installation script
| -rw-r--r-- | install/install-ishtar.sh | 105 | 
1 files changed, 75 insertions, 30 deletions
| diff --git a/install/install-ishtar.sh b/install/install-ishtar.sh index 4c5995ca0..2a26dfbf8 100644 --- a/install/install-ishtar.sh +++ b/install/install-ishtar.sh @@ -66,6 +66,7 @@ EOF      # check distribution      lsb_dist=''      dist_version='' +    backports_activated=''      if command_exists lsb_release; then          lsb_dist="$(lsb_release -si)"      fi @@ -74,6 +75,11 @@ EOF      fi      if [ -z "$lsb_dist" ] && [ -r /etc/debian_version ]; then          lsb_dist='debian' +        MAINBACKS=`cat /etc/apt/sources.list | grep jessie-backports |grep -v "^#"` +        ALLBACKS=`cat /etc/apt/sources.list.d/*.list | grep jessie-backports |grep -v "^#"` +        if [ "$ALLBACKS" != '' ] || [ "$MAINBACKS" != '' ]; then +            backports_activated='true'; +        fi      fi      if [ -z "$lsb_dist" ] && [ -r /etc/fedora-release ]; then          lsb_dist='fedora' @@ -197,16 +203,16 @@ EOF      cat >&2 <<-'EOF'  ------------------------------------------------------------------------------- -  Two version are usually available for Ishtar: master/stable. Master is the +  Two version are usually available for Ishtar: develop/master. Develop is the    bleeding edge version and you can experience problems with this version. -  Stable is the safest choice. +  Master is the safest choice.  EOF      while [ "$version" == '' ]      do -        read -p "* Which version would you like to use? ([stable]/master) " choice +        read -p "* Which version would you like to use? ([develop]/master) " choice          case "$choice" in -            stable ) version="stable";; +            develop ) version="develop";;              master ) version="master";;              '' ) version="stable";;          esac @@ -256,7 +262,7 @@ EOF      # Run setup for each distro accordingly      case "$lsb_dist" in          ubuntu|debian) -            if [ "$dist_version" != "wheezy" ]; then +            if [ "$dist_version" != "jessie" ] && [ "$dist_version" != "wheezy" ]; then                  cat >&2 <<-'EOF'    Sorry this script cannot manage your version of Debian/Ubuntu. @@ -267,13 +273,6 @@ EOF              export DEBIAN_FRONTEND=noninteractive              ( set -x; $sh_c 'sleep 3; apt-get update' ) -            if [ "$default_db" == 'localhost' ]; then -                POSTGIS=postgresql-9.1-postgis -                if [ "$dist_version" == "jessie" ]; then -                    POSTGIS=postgresql-9.4-postgis-2.1 -                fi -                ( set -x; $sh_c 'sleep 3; apt-get install -y -q postgresql '$POSTGIS ) -            fi              if ! command_exists git; then                  echo "-------------------------------------------------------------------------------";                  echo "Installing git..."; @@ -300,33 +299,79 @@ EOF              fi              echo "-------------------------------------------------------------------------------"; -            echo "Installing Ishtar dependencies" -            echo ""; -            ( set -x; $sh_c 'sleep 3; apt-get install -y -q python python-django \ -      libjs-jquery libjs-jquery-ui python-pisa python-django-registration \ -      python-utidylib python-lxml python-imaging python-django-south \ -      python-psycopg2 python-gdal gettext python-unicodecsv memcached \ -      python-tidylib python-django-extra-views python-memcache python-dbf' ) -            ;; -    esac -    echo "-------------------------------------------------------------------------------"; -    echo "Installing BeautifulSoup4" -    echo ""; +            if [ "$dist_version" == "wheezy" ]; then +                if [ "$default_db" == 'localhost' ]; then +                    POSTGIS=postgresql-9.1-postgis +                    if [ "$dist_version" == "jessie" ]; then +                        POSTGIS=postgresql-9.4-postgis-2.1 +                    fi +                    ( set -x; $sh_c 'sleep 3; apt-get install -y -q postgresql '$POSTGIS ) +                fi -    ( set -x; $sh_c 'pip install BeautifulSoup4==4.3.2' ) -    echo "-------------------------------------------------------------------------------"; -    echo "Installing django-simple-history" -    echo ""; -    ( set -x; $sh_c 'pip install git+https://github.com/treyhunner/django-simple-history.git@0fd9b8e9c6f36b0141367b502420efe92d4e21ce' ) +                echo "-------------------------------------------------------------------------------"; +                echo "Installing Ishtar dependencies" +                echo ""; +                ( set -x; $sh_c 'sleep 3; apt-get install -y -q python python-django \ +          libjs-jquery libjs-jquery-ui python-pisa python-django-registration \ +          python-utidylib python-lxml python-imaging python-django-south \ +          python-psycopg2 python-gdal gettext python-unicodecsv memcached \ +          python-tidylib python-django-extra-views python-memcache python-dbf' ) + +                echo "Installing BeautifulSoup4" +                echo ""; + +                ( set -x; $sh_c 'pip install BeautifulSoup4==4.3.2' ) +                echo "-------------------------------------------------------------------------------"; +                echo "Installing django-simple-history" +                echo ""; +                ( set -x; $sh_c 'pip install git+https://github.com/treyhunner/django-simple-history.git@0fd9b8e9c6f36b0141367b502420efe92d4e21ce' ) + +                echo "-------------------------------------------------------------------------------"; +            fi + +            if [ "$dist_version" == "jessie" ]; then +                if [ "$backports_activated" != 'true' ]; then +                    cat >&2 <<-'EOF' + +      In order to install Ishtar you have to activate Debian backports. To do that: + +      echo "deb http://ftp.debian.org/debian jessie-backports main contrib non-free" >> "/etc/apt/sources.list" + +      Run again Ishtar installation script after that. +EOF +                    exit 1 +                fi + +                if [ "$default_db" == 'localhost' ]; then +                    POSTGIS=postgresql-9.4-postgis-2.3 +                    ( set -x; $sh_c 'sleep 3; apt-get install -y -q postgresql '$POSTGIS ) +                fi +                echo "Installing Ishtar dependencies" +                echo ""; +                ( set -x; $sh_c 'sleep 3; apt-get install -y -q python python-django \ +          python-pisa python-django-registration python-bs4 python-django-formtools\ +          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' ) +                echo "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 "-------------------------------------------------------------------------------"; +            fi +            ;; + +    esac      echo "-------------------------------------------------------------------------------";      echo "Installing Ishtar sources"      echo "";      mkdir -p $full_install_path      cd $full_install_path -    ( set -x; git clone git://git.proxience.com/git/oook_replace.git 2> /dev/null ) +    if [ "$dist_version" == "wheezy" ]; then +        ( set -x; git clone https://nimn@gitlab.com/iggdrasil/oook_replace.git 2> /dev/null ) +    fi      ( set -x; git clone https://gitlab.com/iggdrasil/ishtar.git 2> /dev/null )      cd ishtar      git fetch 2> /dev/null | 
