From 6a65dc27b229fc99b55a5b7e68e155bf261de9f1 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 03 Jan 2021 21:01:02 -0500 Subject: package_get_name_and_version(): New function --- (limited to 'src/package') diff --git a/src/package/2.sh b/src/package/2.sh index 2a856d3..18e5a85 100644 --- a/src/package/2.sh +++ b/src/package/2.sh @@ -20,6 +20,15 @@ _package_2_build_deps= +_package_2_get_name_and_version() +{ + # The first line is all we need to parse. + sed '1{ s/^\([^ ][^ ]*\) (\([^)][^)]*\)).*$/\1 \2/; q; };' \ + "${package_dir}/changelog" + + return 0 +} + _package_2_build_deps_field_cb() { local name="${1}" -- cgit v0.9.1