diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2020-11-08 13:26:02 (EST) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2020-11-08 13:30:27 (EST) |
commit | a7eb76327583cd9cec891784ab848742570b41ac (patch) | |
tree | e5a243ca57ed393a195d99bbac4784839f5596c9 /src | |
parent | 54019239f9261b29142a41fc9d35fd1987c6572d (diff) |
src/*/ppt-mkpkgs: Say substvars if not making file
Diffstat (limited to 'src')
-rw-r--r-- | src/2/ppt-mkpkgs | 12 | ||||
-rw-r--r-- | src/3/ppt-mkpkgs | 12 |
2 files changed, 20 insertions, 4 deletions
diff --git a/src/2/ppt-mkpkgs b/src/2/ppt-mkpkgs index 006bdde..06e3460 100644 --- a/src/2/ppt-mkpkgs +++ b/src/2/ppt-mkpkgs @@ -5,6 +5,8 @@ set -eu PLAT= MAKE_SUBSTVARS=false +substvars='' + info() { local fmt="${1}" @@ -59,6 +61,7 @@ make_build_time_pkgs() [ -d "${pkg}" ] || continue pkg="${pkg#src/build/}" var="$(printf '%s' "${pkg}" | tr -C 'A-Za-z0-9-' '-')" + substvars="${substvars} Config-${var}-Depends" mkdir -p "config-${pkg}-${PLAT}.pkg" cat >"config-${pkg}-${PLAT}.pkg/control" <<-EOF # Generated by ppt-mkpkgs. Do not edit. @@ -87,6 +90,7 @@ make_run_time_pkgs() [ -d "${pkg}" ] || continue pkg="${pkg#src/run/}" var="$(printf '%s' "${pkg}" | tr -C 'A-Za-z0-9-' '-')" + substvars="${substvars} Config-${var}-Depends" mkdir -p "config-${pkg}.pkg" cat >"config-${pkg}.pkg/control" <<-EOF # Generated by ppt-mkpkgs. Do not edit. @@ -107,6 +111,8 @@ make_run_time_pkgs() main() { + local var= + PLAT="$(sed '1{s/^config-\([^ ][^ ]*\) (.*$/\1/;};1!q;' changelog)" if ! [ -e 'substvars' ]; then @@ -122,8 +128,10 @@ main() info 'Stub "substvars" file generated. Set variables as '$(: \ )'needed.' else - info 'Ensure "substvars" contains Config-*-Depends '$(: \ - )'variables as needed.' + info 'Ensure "substvars" contains the following variables:' + for var in ${substvars}; do + info ' * %s' "${var}" + done fi } diff --git a/src/3/ppt-mkpkgs b/src/3/ppt-mkpkgs index 4234acd..518e1e3 100644 --- a/src/3/ppt-mkpkgs +++ b/src/3/ppt-mkpkgs @@ -5,6 +5,8 @@ set -eu PLAT= MAKE_SUBSTVARS=false +substvars='' + info() { local fmt="${1}" @@ -61,6 +63,7 @@ make_build_time_pkgs() pkg_ver="${pkg_ver#src/build/}" pkg="${pkg_ver%_*}" var="$(printf '%s' "${pkg}" | tr -C 'A-Za-z0-9-' '-')" + substvars="${substvars} Config-${var}-Depends" mkdir -p "config-${pkg}-${PLAT}.pkg" cat >"config-${pkg}-${PLAT}.pkg/control" <<-EOF # Generated by ppt-mkpkgs. Do not edit. @@ -89,6 +92,7 @@ make_run_time_pkgs() [ -d "${pkg}" ] || continue pkg="${pkg#src/run/}" var="$(printf '%s' "${pkg}" | tr -C 'A-Za-z0-9-' '-')" + substvars="${substvars} Config-${var}-Depends" mkdir -p "config-${pkg}.pkg" cat >"config-${pkg}.pkg/control" <<-EOF # Generated by ppt-mkpkgs. Do not edit. @@ -109,6 +113,8 @@ make_run_time_pkgs() main() { + local var= + PLAT="$(sed '1{s/^config-\([^ ][^ ]*\) (.*$/\1/;};1!q;' changelog)" if ! [ -e 'substvars' ]; then @@ -124,8 +130,10 @@ main() info 'Stub "substvars" file generated. Set variables as '$(: \ )'needed.' else - info 'Ensure "substvars" contains Config-*-Depends '$(: \ - )'variables as needed.' + info 'Ensure "substvars" contains the following variables:' + for var in ${substvars}; do + info ' * %s' "${var}" + done fi } |