summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-21 09:05:48 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-22 16:16:55 (GMT)
commitd95a27b4d9eac34eaf125f7cdf261a215f7f11d1 (patch)
treebf2836716e53e03d645b9d3abb8360f0ec6b79a6 /scripts
parent70e5a74bcebc033b1066a7dd6096e634d5db60a2 (diff)
downloadpoky-d95a27b4d9eac34eaf125f7cdf261a215f7f11d1.tar.gz
scripts/bitbake: Handle the case where git isn't installed cleanly
Currently the user sees ugly errors if git isn't installed, this patch cleans up the code to correctly handle that case. (From OE-Core rev: aeb704fee8b4ffeaeddcdb36ae4e1d62c264ce42) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/bitbake9
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/bitbake b/scripts/bitbake
index ca2bc82..31a34b3 100755
--- a/scripts/bitbake
+++ b/scripts/bitbake
@@ -60,7 +60,7 @@ fi
60needtar="1" 60needtar="1"
61needgit="1" 61needgit="1"
62TARVERSION=`tar --version | head -n 1 | cut -d ' ' -f 4` 62TARVERSION=`tar --version | head -n 1 | cut -d ' ' -f 4`
63GITVERSION=`git --version | cut -d ' ' -f 3` 63GITVERSION=`git --version 2> /dev/null | cut -d ' ' -f 3`
64float_test() { 64float_test() {
65 echo | awk 'END { exit ( !( '"$1"')); }' 65 echo | awk 'END { exit ( !( '"$1"')); }'
66} 66}
@@ -72,9 +72,10 @@ version_compare() {
72# but earlier versions do not; this needs to work properly for sstate 72# but earlier versions do not; this needs to work properly for sstate
73float_test "$TARVERSION > 1.23" && needtar="0" 73float_test "$TARVERSION > 1.23" && needtar="0"
74 74
75# Need git >= 1.7.5 for git-remote --mirror=xxx syntax 75if [ ! -z $GITVERSION ]; then
76version_compare $GITVERSION ">=" 1.7.5 && needgit="0" 76 # Need git >= 1.7.5 for git-remote --mirror=xxx syntax
77 77 version_compare $GITVERSION ">=" 1.7.5 && needgit="0"
78fi
78 79
79buildpseudo="1" 80buildpseudo="1"
80if [ $needpseudo = "1" ]; then 81if [ $needpseudo = "1" ]; then