summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-03-18 13:37:03 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-03-18 13:37:03 (EDT)
commitcf341a8b1621156dfa3fc736a878c9db3f426390 (patch)
tree38a86196a45749f4cf1231f9a3e8534724da8017 /src
parent4511c2069dc447f2a70be3c84007d9f6209da38e (diff)
ob-installplatconf: Declare local variables and wrap long lines
Diffstat (limited to 'src')
-rw-r--r--src/ob-installplatconf.sh22
1 files changed, 16 insertions, 6 deletions
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