]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
travis: put installation and test instructions into shell scripts
authorVincent Bernat <bernat@luffy.cx>
Sun, 2 Mar 2014 23:30:17 +0000 (00:30 +0100)
committerVincent Bernat <bernat@luffy.cx>
Sun, 2 Mar 2014 23:30:17 +0000 (00:30 +0100)
.travis.yml
.travis/install.sh [new file with mode: 0755]
.travis/run.sh [new file with mode: 0755]

index fbea7996ee529d721b6e487e7f83c43c4fbe5497..479fa40899912f4c0cc2254dbc80fe63dc98868a 100644 (file)
@@ -6,13 +6,9 @@ compiler:
   - clang
   - gcc
 install:
-  - [[ "$(uname -s)" != "Darwin" ]] || sudo apt-get -qqy update
-  - [[ "$(uname -s)" != "Darwin" ]] || sudo apt-get -qqy install automake autoconf libtool pkg-config 
-  - [[ "$(uname -s)" != "Darwin" ]] || sudo apt-get -qqy install libsnmp-dev libxml2-dev libjansson-dev libevent-dev libreadline-dev libbsd-dev check
-  - [[ "$(uname -s)" == "Darwin" ]] && brew update
-  - [[ "$(uname -s)" == "Darwin" ]] && brew install pkg-config autoconf automake libtool
-  - [[ "$(uname -s)" == "Darwin" ]] && brew install readline libevent net-snmp jansson libxml2 check
-script: ./autogen.sh && ./configure $LLDPD_CONFIG_ARGS && make && make check && make distcheck && sudo make install
+  - ./.travis/install.sh
+script:
+  - ./.travis/run.sh
 env:
   - LLDPD_CONFIG_ARGS=""
   - LLDPD_CONFIG_ARGS="--with-embedded-libevent"
diff --git a/.travis/install.sh b/.travis/install.sh
new file mode 100755 (executable)
index 0000000..4a5ec26
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+set -e
+
+case "$(uname -s)" in
+    Darwin)
+        brew update
+        brew install \
+            pkg-config autoconf automake libtool \
+            readline libevent net-snmp jansson libxml2 check
+        ;;
+    *)
+        sudo apt-get -qqy update
+        sudo apt-get -qqy install \
+            automake autoconf libtool pkg-config \
+            libsnmp-dev libxml2-dev libjansson-dev \
+            libevent-dev libreadline-dev libbsd-dev \
+            check
+        ;;
+esac
diff --git a/.travis/run.sh b/.travis/run.sh
new file mode 100755 (executable)
index 0000000..810663f
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+./autogen.sh
+./configure $LLDPD_CONFIG_ARGS
+make
+make check
+make distcheck
+sudo make install