configure 4.3.0

parent 4f98e88a
......@@ -9,9 +9,12 @@
# #
#########################################################
trap "kill -s TERM $TOP_PID" TERM
export TOP_PID=$$
check () {
for dir in ${PATH//:/ }; do
[[ -e ${dir}/${1} ]] && (echo found && continue 2)
[[ -x ${dir}/${1} ]] && (echo found && continue 2)
done
}
......@@ -40,13 +43,13 @@ for ARG in "$@"; do
APP="${ARG/:*}"
DESC="${ARG/*:}"
DEP_RETURN=$(check $APP)
if [[ $DEP_RETURN == "found" ]]; then
ok_message "$APP"
elif [[ $DEP_RETURN != "found" && $OPT == "true" ]]; then
if [[ $DEP_RETURN == *found* ]]; then
ok_message $APP
elif [[ $DEP_RETURN != *found* && $OPT == true ]]; then
warn_message $APP "$DESC"
MISSING+=" $APP"
else fail_message m $APP
exit 1
kill -s TERM $TOP_PID
fi
done
......@@ -72,14 +75,14 @@ for ARG in "$@"; do
if [[ $EXIST_RETURN != 0 && ! $OPT == "true" ]]; then
fail_message m $LIB
exit 1
kill -s TERM $TOP_PID
elif [[ $DEP_RETURN == 0 ]]; then
ok_message $LIB ${VERSION}+
elif [[ $EXIST_RETURN != 0 && $OPT == "true" ]]; then
warn_message $LIB "$DESC"
MISSING+=" $LIB"
else fail_message o $LIB $VERSION
exit 1
kill -s TERM $TOP_PID
fi
done
......@@ -107,14 +110,14 @@ for ARG in "$@"; do
if [[ $EXIST_RETURN != 0 && ! $OPT == "true" ]]; then
fail_message m $GIR
exit 1
kill -s TERM $TOP_PID
elif [[ $DEP_RETURN == 1 ]]; then
ok_message $GIR ${VERSION}+
elif [[ $EXIST_RETURN != 0 && $OPT == "true" ]]; then
warn_message $GIR "$DESC"
MISSING+=" $GIR"
else fail_message o $GIR $VERSION
exit 1
kill -s TERM $TOP_PID
fi
done
......@@ -125,19 +128,19 @@ check_python () {
section_message PY
if [[ ! -e $PYTHON ]]; then
if [[ ! -x $PYTHON ]]; then
fail_message p
exit 1
kill -s TERM $TOP_PID
else
PYMINVER=270
PYMAXVER=350
PYVER=$($PYTHON --version 2>&1 | gawk '{ gsub(/\./,""); gsub(/\+/,""); gsub(/rc.*/,""); print $2 }')
if [[ $PYVER -lt $PYMINVER ]]; then
fail_message p-
exit 1
kill -s TERM $TOP_PID
elif [[ $PYVER -gt $PYMAXVER ]]; then
fail_message p+
exit 1
kill -s TERM $TOP_PID
else
ok_message Python
fi
......@@ -172,7 +175,7 @@ imp.find_module('$MOD')" 2>/dev/null
warn_message $DEP "${DESC}"
MISSING+=" $DEP"
else fail_message m $DEP
exit 1
kill -s TERM $TOP_PID
fi
done
......
......@@ -102,7 +102,7 @@ end_message () {
help_message () {
echo -e "\n${GREEN}BashStyle-NG ${MAGENTA}v${xVERSION}${WHITE} / ${YELLOW}(Configure 4.2.4) ${CYAN}help
echo -e "\n${GREEN}BashStyle-NG ${MAGENTA}v${xVERSION}${WHITE} / ${YELLOW}(Configure 4.3.0) ${CYAN}help
\n${WHITE}Options:"
echo -e "${ORANGE}--help${WHITE} *|${GREEN} Display this help message\
\n${ORANGE}--mode=<mode>${WHITE} *|${GREEN} user (do checks) or maintainer (skip checks)\
......
......@@ -128,8 +128,9 @@ Overview of changes in v9.0 "Hotride"
* several improvements in "clock advanced" prompt style
* look for python3 by default, fallback to python
* updated copyright notices 2007 - 2015
* configure 4.2.4: minor code improvements, output message changes, show
version in --help
* configure 4.3.0: minor code improvements, output message changes, show
version in --help, improved error handling, not just check if tested
applications exist, test if they are executable
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment