From cf341a8b1621156dfa3fc736a878c9db3f426390 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Mon, 18 Mar 2019 13:37:03 -0400 Subject: ob-installplatconf: Declare local variables and wrap long lines --- (limited to 'src') diff --git a/src/ob-installplatconf.sh b/src/ob-installplatconf.sh index f379032..87347f8 100644 --- a/src/ob-installplatconf.sh +++ b/src/ob-installplatconf.sh @@ -24,9 +24,14 @@ system_paths_ifs=' copy_config() { - list="${1}" - dest_base="${2}" - dir= + local list="${1}" + local dest_base="${2}" + shift 2 + local src= + local dest= + local dir= + local src_base= + local config_dir_base= while read -r src dest; do if [ -z "${src}" ] || [ -z "${dest}" ]; then @@ -46,7 +51,8 @@ copy_config() src_base='' IFS="${system_paths_ifs}" for config_dir_base in $(ob_get_system_path 'platconf' \ - "${OPK_SOURCE}" "${OPK_SOURCE_VERSION}" "${OPK_HOST_PLAT}"); do + "${OPK_SOURCE}" "${OPK_SOURCE_VERSION}" \ + "${OPK_HOST_PLAT}"); do unset IFS if [ -d "${config_dir_base}" ]; then src_base="${config_dir_base}" @@ -54,8 +60,9 @@ copy_config() done unset IFS if [ -z "${src_base}" ]; then - # This shouldn't happen unless the package maintainer neglected to - # add the config package to the package's Build-Depends field. + # This shouldn't happen unless the package maintainer + # neglected to add the config package to the package's + # Build-Depends field. ob_error "$(ob_get_msg 'no_config_dir')" return 1 fi @@ -73,6 +80,9 @@ copy_config() main() { + local copied= + local pkg= + if ! ob_set_text_domain 'opkbuild'; then printf '%s: Error: Failed to load locale messages\n' \ "${0##*/}" >&2 -- cgit v0.9.1