From 056cdf157d96c7bd20379ed9d1bb63515e871bc6 Mon Sep 17 00:00:00 2001 From: Chris Sharp Date: Sun, 14 Jan 2018 08:39:53 -0500 Subject: [PATCH] LP#1743220: Update script to accommodate Ubuntu 16.04. - renamed the script to "install-ubuntu.sh" - changed the hard-coded Ruby version to a variable that depends on the Ubuntu release (per the lsb_release command) - saw the script work on my 16.04 server Signed-off-by: Chris Sharp Signed-off-by: Jason Stephenson Signed-off-by: Galen Charlton --- .../src/edi_translator/install-ubuntu-trusty.sh | 16 ------------- Open-ILS/src/edi_translator/install-ubuntu.sh | 27 ++++++++++++++++++++++ 2 files changed, 27 insertions(+), 16 deletions(-) delete mode 100755 Open-ILS/src/edi_translator/install-ubuntu-trusty.sh create mode 100755 Open-ILS/src/edi_translator/install-ubuntu.sh diff --git a/Open-ILS/src/edi_translator/install-ubuntu-trusty.sh b/Open-ILS/src/edi_translator/install-ubuntu-trusty.sh deleted file mode 100755 index 6223070d3c..0000000000 --- a/Open-ILS/src/edi_translator/install-ubuntu-trusty.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# hopefully this is all temporary - -# install ruby via APT -sudo apt-get install rubygems-integration ruby-dev - -# install gem dependencies -sudo gem install parseconfig rspec edi4r edi4r-tdid json openils-mapper - -# clone berick's openils-mapper repo -git clone https://github.com/berick/openils-mapper -cd openils-mapper -# move openils-mapper files into place -git checkout -b GIR-segments-for-copy-data origin/GIR-segments-for-copy-data -sudo cp lib/openils/mapper.rb /var/lib/gems/1.9.1/gems/openils-mapper-0.9.9/lib/openils/mapper.rb -sudo cp lib/edi/mapper.rb /var/lib/gems/1.9.1/gems/openils-mapper-0.9.9/lib/edi/mapper.rb diff --git a/Open-ILS/src/edi_translator/install-ubuntu.sh b/Open-ILS/src/edi_translator/install-ubuntu.sh new file mode 100755 index 0000000000..56728db1ee --- /dev/null +++ b/Open-ILS/src/edi_translator/install-ubuntu.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# hopefully this is all temporary + +UBUNTU_RELEASE=$(lsb_release -sc) +if [ "$UBUNTU_RELEASE" == "xenial" ]; then + RUBY_VERSION="2.3.0" +elif [ "$UBUNTU_RELEASE" == "trusty" ]; then + RUBY_VERSION="1.9.1" +else + echo "Could not determine your Ubuntu release." + echo "Please consult $0 and install manually." + exit 1 +fi + +# install ruby via APT +sudo apt-get install rubygems-integration ruby-dev + +# install gem dependencies +sudo gem install parseconfig rspec edi4r edi4r-tdid json openils-mapper + +# clone berick's openils-mapper repo +git clone https://github.com/berick/openils-mapper +cd openils-mapper +# move openils-mapper files into place +git checkout -b GIR-segments-for-copy-data origin/GIR-segments-for-copy-data +sudo cp lib/openils/mapper.rb /var/lib/gems/$RUBY_VERSION/gems/openils-mapper-0.9.9/lib/openils/mapper.rb +sudo cp lib/edi/mapper.rb /var/lib/gems/$RUBY_VERSION/gems/openils-mapper-0.9.9/lib/edi/mapper.rb -- 2.11.0