diff options
author | P. J. McDermott <pjm@nac.net> | 2012-04-24 19:33:27 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2012-04-24 19:33:27 (EDT) |
commit | 63fa875896f8fc883580062180636c9f3b780330 (patch) | |
tree | 28e2a9729931298a284ce7d0444bdfb15da1bb1a /src/oh-gencontrol.sh | |
parent | 4eba11e4d7a7bf9852a5b24cb7630d6d78da257b (diff) |
Make oh-* tools consistently use message library.
Diffstat (limited to 'src/oh-gencontrol.sh')
-rw-r--r-- | src/oh-gencontrol.sh | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/oh-gencontrol.sh b/src/oh-gencontrol.sh index 207240f..4cc48e5 100644 --- a/src/oh-gencontrol.sh +++ b/src/oh-gencontrol.sh @@ -21,6 +21,7 @@ . @@LIBDIR@@/opkhelper/controlfields . @@LIBDIR@@/opkhelper/architecture +. @@LIBDIR@@/opkhelper/messages print_usage() { @@ -29,15 +30,12 @@ print_usage() missing_field() { - printf 'oh-gencontrol: Error: Missing field "%s" in control file.\n' \ - "${1}" >&2 - exit 2 + oh_error 'Missing field "%s" in control file' "${1}" } invalid_pkg_name() { - printf 'oh-gencontrol: Error: Invalid package name: "%s"\n' "${1}" >&2 - exit 2 + oh_error 'Invalid package name: "%s"' "${1}" } copy_required_field() @@ -67,8 +65,7 @@ gen_control_src() srcpkg=$(oh_get_field Source) || missing_field Source oh_validate_pkg_name "${srcpkg}" || invalid_pkg_name "${srcpkg}" - printf 'oh-gencontrol: Generating control directory for package "%s"...\n' \ - "${srcpkg}-src" + oh_info 'Generating control directory for package "%s"...' "${srcpkg}-src" control_dir="${srcpkg}-src.control" control="${control_dir}/control" @@ -92,8 +89,7 @@ gen_control_bin() binpkg="${1}" oh_validate_pkg_name "${binpkg}" || invalid_pkg_name "${binpkg}" - printf 'oh-gencontrol: Generating control directory for package "%s"...\n' \ - "${binpkg}" + oh_info 'Generating control directory for package "%s"...' "${binpkg}" data_dir="${binpkg}.data" control_dir="${binpkg}.control" |