fixed a major defunct in configures check function

store noteworthy configure results in .configure/results
parent 6066c96e
......@@ -7,3 +7,19 @@ ERR_MSG=""
export OLDPATH=$PATH
export PATH="$PATH:/sbin:/usr/sbin:/usr/local/sbin"
export_result ()
{
RES=$PWD/.configure/results
if [[ -e $RES ]]; then
rm $RES
fi
echo MODE=\"$MODE\" >> $RES
echo PREFIX=\"$PREFIX\" >> $RES
echo DIRINFO_ENABLE=\"$DIRINFO_ENABLE\" >> $RES
echo MISSING=\"\( $MISSING \)\" >> $RES
}
......@@ -7,12 +7,12 @@ check ()
IFS=":"
for dir in $PATH; do
if [[ -f "${i}/$1" ]]; then
echo ${dir}/$1
if [[ -f "${dir}/$1" ]]; then
echo "found"
fi
done
IFS=$XFS
IFS=$XFS
}
......@@ -27,14 +27,13 @@ section_message $@
while (( $DONE_COUNTER <= $CHKS_COUNTER )); do
DEPENDENCY=$(grep -w ${SECTION}${DONE_COUNTER} .configure/depends | gawk '{print $2}')
check $DEPENDENCY &>/dev/null
DEP_RETURN=$?
if [[ $DEP_RETURN == 0 ]]; then
DEP_RETURN=$(check $DEPENDENCY)
if [[ $DEP_RETURN == "found" ]]; then
ok_message $DEPENDENCY
elif [[ $DEP_RETURN != 0 && $SECTION == OPT* ]]; then
elif [[ $DEP_RETURN != "found" && $SECTION == OPT* ]]; then
warn_message $DEPENDENCY
ERR_MSG+=$(grep -w ${SECTION}${DONE_COUNTER} .configure/depends | \
gawk -F _ '{ for (x=3; x <= NF; x++) { print $x; } }')
ERR_MSG+=$(grep -w ${SECTION}${DONE_COUNTER} .configure/depends | gawk -F ':' '{print $2}')
MISSING+=" $(grep -w ${SECTION}${DONE_COUNTER} .configure/depends | gawk '{print $2}' )"
else fail_message m $DEPENDENCY
exit 1
fi
......@@ -66,8 +65,8 @@ while (( $DONE_COUNTER <= $CHKS_COUNTER )); do
ok_message $DEPENDENCY ${VERSION}+
elif [[ $EXIST_RETURN != 0 && $SECTION == OPT* ]]; then
warn_message $DEPENDENCY
ERR_MSG+=$(grep -w ${SECTION}${DONE_COUNTER} .configure/depends | \
gawk -F _ '{ for (x=3; x <= NF; x++) { print $x; } }')
ERR_MSG+=$(grep -w ${SECTION}${DONE_COUNTER} .configure/depends | gawk -F':' '{print $2}')
MISSING+=" $(grep -w ${SECTION}${DONE_COUNTER} .configure/depends | gawk '{print $2}' )"
else fail_message o $DEPENDENCY $VERSION
exit 1
fi
......@@ -93,8 +92,8 @@ imp.find_module('$DEPENDENCY')"
ok_message $DEPENDENCY
elif [[ $DEP_RETURN != 0 && $SECTION == OPT* ]]; then
warn_message $DEPENDENCY
ERR_MSG+=$(grep -w ${SECTION}${DONE_COUNTER} .configure/depends | \
gawk -F _ '{ for (x=3; x <= NF; x++) { print $x; } }')
ERR_MSG+=$(grep -w ${SECTION}${DONE_COUNTER} .configure/depends | gawk -F':' '{print $2}')
MISSING+=" $(grep -w ${SECTION}${DONE_COUNTER} .configure/depends | gawk '{print $2}' )"
else fail_message m $DEPENDENCY
exit 1
fi
......
......@@ -8,14 +8,14 @@ APP7 msgfmt
APP8 whiptail
APP9 gconftool-2
OPT_APP1 apm _* The optional apm coulnd't be found. `showbatteryload --apm' won't work\n
OPT_APP2 acpi _* The optional acpi couldn't be found. `showbatteryload --acpi' won't work\n
OPT_APP3 lspci _* The optional lspci couldn't be found. `systeminfos --pci' won't work\n
OPT_APP4 lsusb _* The optional lsusb couldn't be found. `systeminfos --usb' won't work\n
OPT_APP5 ps2pdf _* The optional ps2pdf couldn't be found. `man2pdf' won't work\n
OPT_APP6 lynx _* The optional lynx couldn't be found. `show_weather' and `define' won't work\n
OPT_APP1 apm :* The optional apm coulnd't be found. `showbatteryload --apm' won't work\n
OPT_APP2 acpi :* The optional acpi couldn't be found. `showbatteryload --acpi' won't work\n
OPT_APP3 lspci :* The optional lspci couldn't be found. `systeminfos --pci' won't work\n
OPT_APP4 lsusb :* The optional lsusb couldn't be found. `systeminfos --usb' won't work\n
OPT_APP5 ps2pdf :* The optional ps2pdf couldn't be found. `man2pdf' won't work\n
OPT_APP6 lynx :* The optional lynx couldn't be found. `show_weather' and `define' won't work\n
OPT_SBINAPP1 dmidecode _* The optional dmidecode couldn't be found. `systeminfos --bios' won't work\n
OPT_SBINAPP1 dmidecode :* The optional dmidecode couldn't be found. `systeminfos --bios' won't work\n
LIB1 gtk+ 2.12 gtk+-2.0
LIB2 gconf 2.14 gconf-2.0
......
......@@ -54,6 +54,7 @@ elif [[ $MODE == MAINTAINER ]]; then
copy_in_files
substitute_values
end_message
export_result
elif [[ $MODE == USER ]]; then
......@@ -65,5 +66,6 @@ elif [[ $MODE == USER ]]; then
copy_in_files
substitute_values
end_message
export_result
fi
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