From 888b97fbda8aa867816770fb495dad105411a3eb Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Tue, 25 Dec 2018 16:11:38 -0500 Subject: ob-*: Move function definitions before points of use --- (limited to 'src/ob-installplatconf.sh') diff --git a/src/ob-installplatconf.sh b/src/ob-installplatconf.sh index b8d9c7f..eb05372 100644 --- a/src/ob-installplatconf.sh +++ b/src/ob-installplatconf.sh @@ -22,30 +22,6 @@ system_paths_ifs=' ' -main() -{ - ob_set_text_domain 'opkbuild' - - ob_init_package '..' || exit 1 - ob_parse_package_metadata -c '.opkbuild.cache' || exit 1 - - copied='false' - - if [ -r '../platconf' ]; then - copy_config 'platconf' '.' - copied='true' - fi - - for pkg in ${OPK_PACKAGES}; do - if [ -r "../${pkg}.pkg/platconf" ]; then - copy_config "${pkg}.pkg/platconf" "${pkg}.data" - copied='true' - fi - done - - "${copied}" || ob_info "$(ob_get_msg 'no_plat_config')" -} - copy_config() { list="${1}" @@ -87,4 +63,28 @@ copy_config() done <"../${list}" } +main() +{ + ob_set_text_domain 'opkbuild' + + ob_init_package '..' || exit 1 + ob_parse_package_metadata -c '.opkbuild.cache' || exit 1 + + copied='false' + + if [ -r '../platconf' ]; then + copy_config 'platconf' '.' + copied='true' + fi + + for pkg in ${OPK_PACKAGES}; do + if [ -r "../${pkg}.pkg/platconf" ]; then + copy_config "${pkg}.pkg/platconf" "${pkg}.data" + copied='true' + fi + done + + "${copied}" || ob_info "$(ob_get_msg 'no_plat_config')" +} + main "${@}" -- cgit v0.9.1