From fb77d4ecc6ddbff9845d8a7b620d11a8ff36b910 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Mon, 24 Jan 2011 16:50:59 +0530 Subject: [PATCH 1/2] build-support/factor.sh: use string operators to compare strings --- build-support/factor.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build-support/factor.sh b/build-support/factor.sh index 08af7a5c39..c04ff38a29 100755 --- a/build-support/factor.sh +++ b/build-support/factor.sh @@ -24,8 +24,8 @@ test_program_installed() { } exit_script() { - if [[ $FIND_MAKE_TARGET -eq true ]] ; then - # Must be echo not $ECHO + if [[ $FIND_MAKE_TARGET = true ]] ; then + # Must be echo not $ECHO echo $MAKE_TARGET; fi exit $1 @@ -39,7 +39,7 @@ ensure_program_installed() { test_program_installed $i if [[ $? -eq 0 ]]; then $ECHO -n "not " - else + else installed=$(( $installed + 1 )) fi $ECHO "found!" @@ -97,7 +97,7 @@ set_make() { dragonflybsd) MAKE='gmake';; *) MAKE='make';; esac - if ! [[ $MAKE -eq 'gmake' ]] ; then + if ! [[ $MAKE = 'gmake' ]] ; then ensure_program_installed gmake fi } @@ -473,7 +473,7 @@ get_boot_image() { } get_url() { - if [[ $DOWNLOADER -eq "" ]] ; then + if [[ -z $DOWNLOADER ]] ; then set_downloader; fi $ECHO $DOWNLOADER $1 ; From bdc0526f37bee4c460201bbc9d510f3be77e4023 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Mon, 24 Jan 2011 22:42:06 -0500 Subject: [PATCH 2/2] build-support/factor.sh: typo was causing make detection to fail on linux --- build-support/factor.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-support/factor.sh b/build-support/factor.sh index c04ff38a29..52a989b78d 100755 --- a/build-support/factor.sh +++ b/build-support/factor.sh @@ -97,7 +97,7 @@ set_make() { dragonflybsd) MAKE='gmake';; *) MAKE='make';; esac - if ! [[ $MAKE = 'gmake' ]] ; then + if [[ $MAKE = 'gmake' ]] ; then ensure_program_installed gmake fi }