LP#1796945 Reporter cloning and creation fixes
[working/Evergreen.git] / Open-ILS / src / edi_translator / install-ubuntu.sh
1 #!/bin/bash
2 # hopefully this is all temporary
3
4 UBUNTU_RELEASE=$(lsb_release -sc)
5 if [ "$UBUNTU_RELEASE" == "xenial" ]; then
6     RUBY_VERSION="2.3.0"
7 else 
8     echo "Could not determine your Ubuntu release."
9     echo "Please consult $0 and install manually."
10     exit 1
11 fi
12
13 # install ruby via APT
14 sudo apt-get install rubygems-integration ruby-dev
15
16 # install gem dependencies
17 sudo gem install parseconfig rspec edi4r edi4r-tdid json openils-mapper
18
19 # clone berick's openils-mapper repo
20 git clone https://github.com/berick/openils-mapper
21 cd openils-mapper
22 # move openils-mapper files into place
23 git checkout -b GIR-segments-for-copy-data origin/GIR-segments-for-copy-data
24 sudo cp lib/openils/mapper.rb /var/lib/gems/$RUBY_VERSION/gems/openils-mapper-0.9.9/lib/openils/mapper.rb
25 sudo cp lib/edi/mapper.rb /var/lib/gems/$RUBY_VERSION/gems/openils-mapper-0.9.9/lib/edi/mapper.rb