summaryrefslogtreecommitdiff
path: root/scripts/check-dependencies.sh
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2012-12-21 19:59:35 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2012-12-21 19:59:35 (GMT)
commit870f3dcd2d20362995308cd2829c8d7ba61cf623 (patch)
tree3012a4714c58d7b5749a0882ec29287d980a7652 /scripts/check-dependencies.sh
parentb1ecf351347d83830a546d3d6c49eafc6781634b (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-xscripts/check-dependencies.sh7
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}'`
contact: Jan Huwald // Impressum