Commit 1de5ba75 authored by Johann's avatar Johann

Configuration: Use 'is_in' instead of echo | grep

Change-Id: I38f7684969f12a624980f4e06698379a49e61bdf
parent 0146fa95
...@@ -540,22 +540,20 @@ process_common_cmdline() { ...@@ -540,22 +540,20 @@ process_common_cmdline() {
;; ;;
--enable-?*|--disable-?*) --enable-?*|--disable-?*)
eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'` eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'`
if echo "${ARCH_EXT_LIST}" | grep "^ *$option\$" >/dev/null; then if is_in ${option} ${ARCH_EXT_LIST}; then
[ $action = "disable" ] && RTCD_OPTIONS="${RTCD_OPTIONS}--disable-${option} " [ $action = "disable" ] && RTCD_OPTIONS="${RTCD_OPTIONS}--disable-${option} "
elif [ $action = "disable" ] && ! disabled $option ; then elif [ $action = "disable" ] && ! disabled $option ; then
echo "${CMDLINE_SELECT}" | grep "^ *$option\$" >/dev/null || is_in ${option} ${CMDLINE_SELECT} || die_unknown $opt
die_unknown $opt
log_echo " disabling $option" log_echo " disabling $option"
elif [ $action = "enable" ] && ! enabled $option ; then elif [ $action = "enable" ] && ! enabled $option ; then
echo "${CMDLINE_SELECT}" | grep "^ *$option\$" >/dev/null || is_in ${option} ${CMDLINE_SELECT} || die_unknown $opt
die_unknown $opt
log_echo " enabling $option" log_echo " enabling $option"
fi fi
${action}_feature $option ${action}_feature $option
;; ;;
--require-?*) --require-?*)
eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'` eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'`
if echo "${ARCH_EXT_LIST}" none | grep "^ *$option\$" >/dev/null; then if is_in ${option} ${ARCH_EXT_LIST}; then
RTCD_OPTIONS="${RTCD_OPTIONS}${opt} " RTCD_OPTIONS="${RTCD_OPTIONS}${opt} "
else else
die_unknown $opt die_unknown $opt
......
...@@ -396,7 +396,7 @@ process_cmdline() { ...@@ -396,7 +396,7 @@ process_cmdline() {
;; ;;
--enable-?*|--disable-?*) --enable-?*|--disable-?*)
eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'` eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'`
if echo "${EXPERIMENT_LIST}" | grep "^ *$option\$" >/dev/null; then if is_in ${option} ${EXPERIMENT_LIST}; then
if enabled experimental; then if enabled experimental; then
${action}_feature $option ${action}_feature $option
else else
......
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