FreeCalypso > hg > freecalypso-sw
diff gsm-fw/cfgmagic/functions @ 524:11b6ca57a079
gsm-fw/cfgmagic: first rough sketch at L1 configuration
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Mon, 14 Jul 2014 07:03:53 +0000 |
parents | afceeeb2cba1 |
children | 042c178ebac5 |
line wrap: on
line diff
--- a/gsm-fw/cfgmagic/functions Mon Jul 14 05:16:14 2014 +0000 +++ b/gsm-fw/cfgmagic/functions Mon Jul 14 07:03:53 2014 +0000 @@ -41,46 +41,43 @@ } export_to_c() { - if [ $# != 1 ] - then - echo "export_to_c: wrong number of arguments" 1>&2 - exit 1 - fi - case "$c_export_list" in - *" $1 "* | *" $1") - ;; - *) - c_export_list="$c_export_list $1" - ;; - esac + while [ $# != 0 ] + do + case "$c_export_list" in + *" $1 "* | *" $1") + ;; + *) + c_export_list="$c_export_list $1" + ;; + esac + shift + done } export_to_mk() { - if [ $# != 1 ] - then - echo "export_to_mk: wrong number of arguments" 1>&2 - exit 1 - fi - case "$mk_export_list" in - *" $1 "* | *" $1") - ;; - *) - mk_export_list="$mk_export_list $1" - ;; - esac + while [ $# != 0 ] + do + case "$mk_export_list" in + *" $1 "* | *" $1") + ;; + *) + mk_export_list="$mk_export_list $1" + ;; + esac + shift + done } export_to_m4() { - if [ $# != 1 ] - then - echo "export_to_m4: wrong number of arguments" 1>&2 - exit 1 - fi - case "$m4_export_list" in - *" $1 "* | *" $1") - ;; - *) - m4_export_list="$m4_export_list $1" - ;; - esac + while [ $# != 0 ] + do + case "$m4_export_list" in + *" $1 "* | *" $1") + ;; + *) + m4_export_list="$m4_export_list $1" + ;; + esac + shift + done }