diff options
author | don bright <hugh.m.bright@gmail.com> | 2012-12-21 19:59:35 (GMT) |
---|---|---|
committer | don bright <hugh.m.bright@gmail.com> | 2012-12-21 19:59:35 (GMT) |
commit | 870f3dcd2d20362995308cd2829c8d7ba61cf623 (patch) | |
tree | 3012a4714c58d7b5749a0882ec29287d980a7652 /scripts/check-dependencies.sh | |
parent | b1ecf351347d83830a546d3d6c49eafc6781634b (diff) |
deal with situation where gcc doesnt exist. add mageia urpmi commands. shorten os detect code
Diffstat (limited to 'scripts/check-dependencies.sh')
-rwxr-xr-x | scripts/check-dependencies.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/check-dependencies.sh b/scripts/check-dependencies.sh index f1a16b8..4254ee9 100755 --- a/scripts/check-dependencies.sh +++ b/scripts/check-dependencies.sh @@ -144,7 +144,12 @@ bison_sysver() gcc_sysver() { bingcc=$1/bin/gcc - if [ ! -x $1/bin/gcc ]; then bingcc=gcc; fi + if [ ! -x $1/bin/gcc ]; then + if [ "`command -v gcc`" ]; then # fallback to $PATH + bingcc=gcc; + fi + fi + if [ ! -x $bingcc ]; then return; fi if [ ! "`$bingcc --version`" ]; then return; fi gccver=`$bingcc --version| grep -i gcc` gccver=`echo $gccver | sed s/"[^0-9. ]"/" "/g | awk '{print $1}'` |