configure 4.3.7 (code review)

parent a6fdc451
......@@ -14,7 +14,7 @@ APP_VERSION=9.2
APP_CODENAME="Galvanize"
APP_LANGUAGES="de"
CFG_VERSION="4.3.6"
CFG_VERSION="4.3.7"
if [[ -d "/usr/lib/girepository-1.0/" ]]; then
export GIRPATH="/usr/lib/girepository-1.0/"
......@@ -37,7 +37,7 @@ PYMAXVER_P="3.5.0"
PYMINVER=${PYMINVER_P//.}
PYMAXVER=${PYMAXVER_P//.}
for lang in ${APP_LANGUAGES[@]}; do
for lang in "${APP_LANGUAGES[@]}"; do
LC_MESSAGES_DIRS="${LC_MESSAGES_DIRS} ${lang}/LC_MESSAGES/"
done
......@@ -58,6 +58,6 @@ LOCALEDIR_LIST=( ${LC_MESSAGES_DIRS} )
ICONDIR=\"${DATADIR}/icons/hicolor/32x32/apps/\"
DESKTOPDIR=\"${DATADIR}/applications/\"
PCDIR=\"${PCDIR}/\"
APP_LANGUAGES=\"${APP_LANGUAGES}\"" | sed -e 's,//,/,g' >> ${PWD}/.configure/results
APP_LANGUAGES=\"${APP_LANGUAGES}\"" | sed -e 's,//,/,g' >> "${PWD}"/.configure/results
}
......@@ -39,14 +39,14 @@ check_apps () {
for ARG in "${@}"; do
APP="${ARG/:*}"
DESC="${ARG/*:}"
DEP_RETURN=$(check ${APP})
DEP_RETURN=$(check "${APP}")
if [[ ${DEP_RETURN} == *found* ]]; then
ok_message ${APP}
ok_message "${APP}"
elif [[ ${DEP_RETURN} != *found* && ${OPT} == true ]]; then
warn_message ${APP} "${DESC}"
warn_message "${APP}" "${DESC}"
MISSING+=" ${APP}"
else fail_message m ${APP}
kill -s TERM ${TOP_PID}
else fail_message m "${APP}"
kill -s TERM "${TOP_PID}"
fi
done
......@@ -59,27 +59,27 @@ check_libs () {
for ARG in "${@}"; do
LIB=$(gawk -F \: '{print $1}' <(echo ${ARG}))
VERSION=$(gawk -F \: '{print $2}' <(echo ${ARG}))
PC_FILE=$(gawk -F \: '{print $3}' <(echo ${ARG}))
DESC=$(gawk -F \: '{print $4}' <(echo ${ARG}))
LIB=$(gawk -F : '{print $1}' <(echo "${ARG}"))
VERSION=$(gawk -F : '{print $2}' <(echo "${ARG}"))
PC_FILE=$(gawk -F : '{print $3}' <(echo "${ARG}"))
DESC=$(gawk -F : '{print $4}' <(echo "${ARG}"))
pkg-config --exists ${PC_FILE}
pkg-config --exists "${PC_FILE}"
EXIST_RETURN=$?
pkg-config --atleast-version=${VERSION} ${PC_FILE}
pkg-config --atleast-version="${VERSION}" "${PC_FILE}"
DEP_RETURN=$?
if [[ ${EXIST_RETURN} != 0 && ! ${OPT} == true ]]; then
fail_message m $LIB
kill -s TERM ${TOP_PID}
fail_message m "${LIB}"
kill -s TERM "${TOP_PID}"
elif [[ ${DEP_RETURN} == 0 ]]; then
ok_message $LIB ${VERSION}+
ok_message "${LIB}" "${VERSION}"+
elif [[ ${EXIST_RETURN} != 0 && ${OPT} == true ]]; then
warn_message $LIB "${DESC}"
MISSING+=" $LIB"
else fail_message o $LIB ${VERSION}
kill -s TERM ${TOP_PID}
warn_message "${LIB}" "${DESC}"
MISSING+=" ${LIB}"
else fail_message o "${LIB}" "${VERSION}"
kill -s TERM "${TOP_PID}"
fi
done
......@@ -93,28 +93,28 @@ check_gir () {
for ARG in "${@}"; do
GIR=$(gawk -F \: '{print $1}' <(echo ${ARG}))
VERSION=$(gawk -F \: '{print $2}' <(echo ${ARG}))
TYPE_LIB=$(gawk -F \: '{print $3}' <(echo ${ARG}))
DESC=$(gawk -F \: '{print $4}' <(echo ${ARG}))
FILE=$(basename ${GIRPATH}/$TYPE_LIB* .typelib 2>/dev/null)
GIR=$(gawk -F : '{print $1}' <(echo "${ARG}"))
VERSION=$(gawk -F : '{print $2}' <(echo "${ARG}"))
TYPE_LIB=$(gawk -F : '{print $3}' <(echo "${ARG}"))
DESC=$(gawk -F : '{print $4}' <(echo "${ARG}"))
FILE=$(basename "${GIRPATH}"/"${TYPE_LIB}"* .typelib 2>/dev/null)
if [[ $FILE != ".typelib" ]]; then
EXIST_RETURN=0
XVER=$(gawk -F \- '{print $2}' <(echo $FILE))
XVER=$(gawk -F - '{print $2}' <(echo "${FILE}"))
DEP_RETURN=$(echo "$XVER >= ${VERSION}" | bc)
fi
if [[ ${EXIST_RETURN} != 0 && ! ${OPT} == true ]]; then
fail_message m ${GIR}
kill -s TERM ${TOP_PID}
fail_message m "${GIR}"
kill -s TERM "${TOP_PID}"
elif [[ ${DEP_RETURN} == 1 ]]; then
ok_message ${GIR} ${VERSION}+
ok_message "${GIR}" "${VERSION}"+
elif [[ ${EXIST_RETURN} != 0 && ${OPT} == true ]]; then
warn_message ${GIR} "${DESC}"
warn_message "${GIR}" "${DESC}"
MISSING+=" ${GIR}"
else fail_message o ${GIR} ${VERSION}
kill -s TERM ${TOP_PID}
else fail_message o "${GIR}" "${VERSION}"
kill -s TERM "${TOP_PID}"
fi
done
......@@ -127,15 +127,15 @@ check_python () {
if [[ ! -x ${PYTHON} ]]; then
fail_message p
kill -s TERM ${TOP_PID}
kill -s TERM "${TOP_PID}"
else
PYVER=$(${PYTHON} --version 2>&1 | gawk '{ gsub(/\./,""); gsub(/\+/,""); gsub(/rc.*/,""); print $2 }')
if [[ ${PYVER:0:3} -lt ${PYMINVER} ]]; then
fail_message p-
kill -s TERM ${TOP_PID}
kill -s TERM "${TOP_PID}"
elif [[ ${PYVER:0:3} -gt ${PYMAXVER} ]]; then
fail_message p+
kill -s TERM ${TOP_PID}
kill -s TERM "${TOP_PID}"
else
ok_message Python
fi
......@@ -150,9 +150,9 @@ check_pymods () {
for ARG in "${@}"; do
MOD=$(gawk -F \: '{print $1}' <(echo ${ARG}))
SMOD=$(gawk -F \: '{print $2}' <(echo ${ARG}))
DESC=$(gawk -F \: '{print $3}' <(echo ${ARG}))
MOD=$(gawk -F : '{print $1}' <(echo "${ARG}"))
SMOD=$(gawk -F : '{print $2}' <(echo "${ARG}"))
DESC=$(gawk -F : '{print $3}' <(echo "${ARG}"))
if [[ ${SMOD} ]]; then
DEP="${SMOD} (${MOD})"
......@@ -167,10 +167,10 @@ imp.find_module('${MOD}')" 2>/dev/null
if [[ ${DEP_RETURN} == 0 ]]; then
ok_message "${DEP}"
elif [[ ${DEP_RETURN} != 0 && ${OPT} == true ]]; then
warn_message ${DEP} "${DESC}"
warn_message "${DEP}" "${DESC}"
MISSING+=" ${DEP}"
else fail_message m ${DEP}
kill -s TERM ${TOP_PID}
else fail_message m "${DEP}"
kill -s TERM "${TOP_PID}"
fi
done
......
......@@ -13,7 +13,7 @@ IN_FILES=( rc/nx-rc data/bashstyle data/bashstyle-ng.pc )
copy_in_files () {
for in_file in ${IN_FILES[@]}; do
for in_file in "${IN_FILES[@]}"; do
cp "${in_file}".in "${in_file}";
done
......@@ -24,7 +24,7 @@ substitute_values () {
sed -e "s>@VERSION@>${APP_VERSION}>g" \
-e "s>@PREFIX@>${PREFIX}>g" \
-e "s>@DATADIR@>${DATADIR}>g" \
-e "s>@PYTHON@>${PYTHON}>g" -i ${IN_FILES[@]}
sed -e "s>//>/>g" -i ${IN_FILES[@]}
-e "s>@PYTHON@>${PYTHON}>g" -i "${IN_FILES[@]}"
sed -e "s>//>/>g" -i "${IN_FILES[@]}"
}
......@@ -14,11 +14,11 @@ export TOP_PID=$$
MODULES=( base color messages checks substitute depends )
for mod in ${MODULES[@]}; do
source ${PWD}/.configure/${mod}
for mod in "${MODULES[@]}"; do
source "${PWD}"/.configure/"${mod}"
done
rm -f ${PWD}/.configure/results
rm -f "${PWD}"/.configure/results
xcount=0
while [[ ${xcount} -lt $# ]]; do
......@@ -34,10 +34,10 @@ while [[ ${xcount} -lt $# ]]; do
--help ) MODE=help ;;
--no-postinstall ) DISABLE_POSTINSTALL=1
echo "DISABLE_POSTINSTALL=1" >> \
${PWD}/.configure/results ;;
"${PWD}"/.configure/results ;;
esac
shift
xcount=$((${xcount}+1))
xcount=$((xcount+1))
done
unset xcount
......
......@@ -156,6 +156,11 @@ shut up
@item Configure
@itemize @minus
@item 4.3.7
@itemize +
@item code review
@end itemize
@item 4.3.6
@itemize +
@item add @code{--docdir} switch back
......
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