From 5a44c1ff07a7ca47fe6c85e0239af2037b813d29 Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Thu, 20 Feb 2014 10:28:52 -0500 Subject: popbpoi --- .travis.sh | 2 +- .travis.yml | 2 +- setup.sh | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.travis.sh b/.travis.sh index 4b1926b..930fe85 100755 --- a/.travis.sh +++ b/.travis.sh @@ -18,7 +18,7 @@ case "$1" in mv *.rpyc unrpyc ;; install) - MAKEOPTS="-j`nproc` -s" + MAKEOPTS="-j`nproc` ${MAKEOPTS}" sudo apt-get install -q libtheora-dev libvpx-dev libx264-dev yasm diff --git a/.travis.yml b/.travis.yml index 4d4b5df..129e01a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: c python: "3.3" node_js: "0.11" -env: MINIMAL=1 CFLAGS="-O2 -march=native -pipe" CXXFLAGS="-O2 -march=native -pipe" +env: MINIMAL=1 CFLAGS="-O2 -march=native -pipe" CXXFLAGS="-O2 -march=native -pipe" MAKEOPTS="-s" before_install: ./.travis.sh before_install install: ./.travis.sh install script: ./setup.sh diff --git a/setup.sh b/setup.sh index 7efb951..b8f40bc 100755 --- a/setup.sh +++ b/setup.sh @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash -if [ -z $MAKEOPTS ]; then - MAKEOPTS="-j`nproc`" - echo "No MAKEOPTS specified, setting $MAKEOPTS automatically." +if ! grep -q -- -j <<< "$MAKEOPTS"; then + MAKEOPTS="-j`nproc` $MAKEOPTS" + echo "No -j detected, setting $MAKEOPTS automatically." printf "%sGiB free RAM, approx 1GiB/core required (depending on ffmpeg settings)." "$(free -gt | tail -n 1 | awk '{print $4}')" fi @@ -11,6 +11,7 @@ set -e -x cd $(dirname $0) cd unrpyc +# silence build failure make $MAKEOPTS install || true cd .. -- cgit v1.2.3-70-g09d2