From: Steve C. <ste...@us...> - 2007-06-21 22:02:34
|
Update of /cvsroot/stepmania/stepmania/Utils In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv24831 Modified Files: build.sh Log Message: Allow running with sh. Check for configure. Index: build.sh =================================================================== RCS file: /cvsroot/stepmania/stepmania/Utils/build.sh,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -p -r1.5 -r1.6 --- build.sh 21 Mar 2007 07:07:21 -0000 1.5 +++ build.sh 21 Jun 2007 22:02:31 -0000 1.6 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh verbose=0 msg= @@ -30,17 +30,18 @@ failure () { else echo failed$error fi + echo "Consider passing --verbose to $0. Pass --help for details." exit 1 } call () { if [ $verbose -ge 2 ]; then - echo $@ + echo "$@" fi if [ $verbose -gt 0 ]; then - eval $@ || failure + eval "$@" || failure else - eval $@ &>/dev/null || failure + eval "$@" >/dev/null 2>&1 || failure fi success } @@ -68,7 +69,13 @@ version () { exit 0 } -if which getopt &>/dev/null; then +if ! test -x configure; then + msg='Checking for configure' + verbose=1 + failure 'file not found.' +fi + +if which getopt >/dev/null 2>&1; then set -- `getopt -l download,ffmpeg,configure,stepmania,help \ -l verbose,version -- dfcshv $*` fi @@ -139,7 +146,7 @@ if [ ! -f _build/src/config.h ]; then message 'Configuring StepMania' mkdir -p _build cd _build - call ../configure --with-ffmpeg=../$ffmpeg/_inst $@ + call ../configure --with-ffmpeg=../$ffmpeg/_inst "$@" cd .. fi if [ -n "$s_configure" ]; then exit 0; fi |