From 334c1fcfe4fc8242e2706c4205bbe7e5bf055095 Mon Sep 17 00:00:00 2001 From: MichaelOultram Date: Mon, 3 Aug 2015 22:33:39 +0100 Subject: [PATCH] Updated .travis.yml --- .travis.yml | 13 ++++--------- install-dependencies.sh | 29 +++++++++++++++++++++++++++++ install-opus.sh | 10 ---------- 3 files changed, 33 insertions(+), 19 deletions(-) create mode 100644 install-dependencies.sh delete mode 100644 install-opus.sh diff --git a/.travis.yml b/.travis.yml index 8dabcbe..cb3fe06 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,20 +3,15 @@ language: go cache: directories: - $HOME/opus + - $HOME/bin - $TRAVIS_BUILD_DIR/.vendor before_script: - - wget http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz -O /tmp/ffmpeg.tar.xz - - tar -xvf /tmp/ffmpeg.tar.xz --strip 1 --no-anchored ffmpeg ffprobe - - chmod a+rx ffmpeg ffprobe - - mv ff* ~/bin - - curl https://yt-dl.org/downloads/2015.07.28/youtube-dl -o ~/bin/youtube-dl - - chmod a+rx ~/bin/youtube-dl - - bash install-opus.sh - - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$HOME/opus/lib/pkgconfig + - bash install-dependencies.sh install: - ls -R $HOME/opus env: - - PATH=$PATH:~/bin/ \ No newline at end of file + - PATH=$PATH:~/bin/ + - PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$HOME/opus/lib/pkgconfig \ No newline at end of file diff --git a/install-dependencies.sh b/install-dependencies.sh new file mode 100644 index 0000000..90d3db1 --- /dev/null +++ b/install-dependencies.sh @@ -0,0 +1,29 @@ +#!/bin/sh +set -e + +# check to see if ffmpeg is installed +if [ ! -f "$HOME/bin/ffmpeg" ]; then + wget http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz -O /tmp/ffmpeg.tar.xz + tar -xvf /tmp/ffmpeg.tar.xz --strip 1 --no-anchored ffmpeg ffprobe + chmod a+rx ffmpeg ffprobe + mv ff* $HOME/bin +else + echo 'Using cached version of ffmpeg.'; +fi + +# check to see if opus is installed +if [ ! -d "$HOME/opus/lib" ]; then + wget http://downloads.xiph.org/releases/opus/opus-1.0.3.tar.gz + tar xzvf opus-1.0.3.tar.gz + cd opus-1.0.3 && ./configure --prefix=$HOME/opus && make && make install +else + echo 'Using cached version of opus.'; +fi + +# check to see if youtube-dl is installed +if [ ! -f "$HOME/bin/youtube-dl" ]; then + curl https://yt-dl.org/downloads/2015.07.28/youtube-dl -o ~/bin/youtube-dl + chmod a+rx ~/bin/youtube-dl +else + echo 'Using cached version of youtube-dl.'; +fi \ No newline at end of file diff --git a/install-opus.sh b/install-opus.sh deleted file mode 100644 index cf818c4..0000000 --- a/install-opus.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -set -e -# check to see if opus folder is empty -if [ ! -d "$HOME/opus/lib" ]; then - wget http://downloads.xiph.org/releases/opus/opus-1.0.3.tar.gz - tar xzvf opus-1.0.3.tar.gz - cd opus-1.0.3 && ./configure --prefix=$HOME/opus && make && make install -else - echo 'Using cached directory.'; -fi \ No newline at end of file