From aa01ea8eb1dfcde22d5e4a870eca2913ac459bd2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= <glen@pld-linux.org>
Date: Fri, 8 Sep 2017 13:33:47 +0300
Subject: [PATCH 1/3] remove system file when testing

---
 .travis.yml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index 307e605..321d6b9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -24,6 +24,9 @@ script:
  - autoreconf -f -i
  - ./configure --prefix=/usr
  - make -j4
+   # remove system file package first
+   # see https://github.com/file/file-tests/issues/3
+ - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get remove -y libmagic1 file; fi
  - sudo make install
  - cd ..
  - which file

From 00509b347b8a6a78fcf9984eb1719274a0833daf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= <glen@pld-linux.org>
Date: Thu, 14 Sep 2017 19:52:07 +0300
Subject: [PATCH 2/3] use os specific prefix

unable to replace files in /usr on osx
---
 .travis.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 321d6b9..b8865e3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -22,7 +22,8 @@ script:
  - test -z "$commit" || git checkout $commit
  - git log -1
  - autoreconf -f -i
- - ./configure --prefix=/usr
+ - case "$TRAVIS_OS_NAME" in osx) prefix=/usr/local;; linux) prefix=/usr;; esac
+ - ./configure --prefix=$prefix
  - make -j4
    # remove system file package first
    # see https://github.com/file/file-tests/issues/3

From 167c5c2667ffec81b279fa4eb3b084828535a2e6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= <glen@pld-linux.org>
Date: Mon, 25 Sep 2017 23:57:20 +0300
Subject: [PATCH 3/3] shell_session_update: command not found workaround for
 osx

---
 .travis.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index b8865e3..73aa95c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,6 +11,8 @@ before_install:
  # workaround for /usr/local/Library/ENV/4.3/sed: No such file or directory
  # http://stackoverflow.com/a/38471887
  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew reinstall -s libtool; fi
+ # https://github.com/travis-ci/travis-ci/issues/6307
+ - if [ "$TRAVIS_OS_NAME" = "osx" ]; then rvm get stable; fi
 
 script:
  # abort on any command failure