CDS detector added

Former-commit-id: 93fac7a70052d06c2a12bf8af59820c653edd31b
Former-commit-id: 0869fdad0f550941a0f78f1e4c57f4fcdb3f6076
This commit is contained in:
alain viari
2015-11-08 14:28:05 +01:00
parent 50d5458bc1
commit 8dab2d56b2
648 changed files with 290109 additions and 543 deletions

51
scripts/lib/check_version.sh Executable file
View File

@ -0,0 +1,51 @@
#!/bin/csh -f
#
# check (gnu) software version
#
# usage: check_version.sh cmd version
#
#
set HERE = `dirname $0`
set ORG_HOME = $HERE/../..
set ORG_PORTNAME = `$ORG_HOME/config/guess_port`
set path = ($path $ORG_HOME/ports/$ORG_PORTNAME/bin)
if ($#argv != 2) then
egrep "^# *usage:" $0 | sed -e 's/^# *//1'
exit 1
endif
set name = `echo "$1" | awk '{print $1}'`
echo -n "+ checking $name"
set ok = `which $name`
if ($status != 0) then
echo ""
echo "* $name : command not found"
echo "* please consider installing $name from src/_unix_tools_"
exit 1
endif
set num = `eval "$1" | tr -d -C '[0-9].'`
echo -n " version $num"
awk -v NUM=$num -v REF=$2 -f $HERE/version.awk
if ($status != 0) then
echo ""
echo "* $name version $num (should be >= $2)"
echo "* please consider installing $name from src/_unix_tools_"
exit 2
endif
echo " (>= $2) OK"
exit 0