From 33abad0f760c4f82ab2253a592abf61500ad5ec4 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Fri, 15 Nov 2013 17:54:44 +0000 Subject: [PATCH 1/3] If /bin/sh = dash then use /bin/bash instead This prevents `trap: ERR: bad trap` errors on systems like Debian/Ubuntu. Fixes GH-25 --- Makefile | 2 +- configure | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2f7da1b..0752193 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,7 @@ build: roundup roundup: roundup.sh FORCE $(SHELL) -n roundup.sh - cp roundup.sh roundup + sed "s~#!/bin/sh~#!${SHELL}~" roundup.sh > roundup chmod 0755 roundup test: roundup diff --git a/configure b/configure index af86596..68f2065 100755 --- a/configure +++ b/configure @@ -167,7 +167,11 @@ echo "building for ${UNAME:-unknown}" \ looking "for /bin/sh" SH=$(have /bin/sh) && { - if expr "$("$SH" --version 2>/dev/null)" : '.*bash' >/dev/null + if test $(readlink /bin/sh) = dash + then + SH=/bin/bash + found '' "oh ick, it looks like dash. Setting SH to $SH" + elif expr "$("$SH" --version 2>/dev/null)" : '.*bash' >/dev/null then found '' "oh ick, it looks like bash" else From ddc7066e2cc7b8a9179ef08e087d9616d77bcfa7 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Fri, 15 Nov 2013 18:03:22 +0000 Subject: [PATCH 2/3] roundup-1-test.sh: Replace /bin/sh with $SHELL --- roundup-1-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roundup-1-test.sh b/roundup-1-test.sh index 87c5d4f..967e9f0 100644 --- a/roundup-1-test.sh +++ b/roundup-1-test.sh @@ -25,7 +25,7 @@ # ------------ # Prevent carpel tunnel -rup() { /bin/sh $0 $1-test.sh ; } +rup() { $SHELL $0 $1-test.sh ; } # The Plan # -------- From 90cc61269ec15e74e0523168aa6de4aaf90c6d95 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Fri, 15 Nov 2013 07:55:59 -0800 Subject: [PATCH 3/3] Add .travis.yml for Travis CI --- .travis.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..38a2408 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,7 @@ +language: bash +install: ./configure --development && make +script: + # Need to prefix with bash until https://github.com/bmizerany/roundup/issues/25 is fixed + - ./roundup --help + - ./roundup -v + - ./roundup roundup-1-test.sh edge-test.sh