summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorSalvatore Bonaccorso <carnil@debian.org>2020-06-20 10:43:29 +0200
committerSalvatore Bonaccorso <carnil@debian.org>2020-06-22 10:36:49 +0200
commit6a7946cfca0354ad33783b250ee399701cb4967d (patch)
tree37c784fbda3aad9ed5952545249ec16cb250365a /bin
parent7a31ddd1adf0577efcd7077cfb94975316d517ad (diff)
Introduce new pkgs_print() helper function
Depending on if a suffix should be included in the printout of the package set accordingly the format string for the printf invocation. The idea is depending on if only on release is supported the listing in the dsa-needed.txt should be either: -- pkg -- if only one suite is supported. In the case multiple suites are supported but the package needs an update only in one release, the listing should be -- $pkg/release -- Introduce helper function taking arguments as package, flag for suffix inclusion an to be used suffix. A later commit will use the new helper function where needed. Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/add-dsa-needed.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/add-dsa-needed.sh b/bin/add-dsa-needed.sh
index e38fdd653b..1de14aec65 100755
--- a/bin/add-dsa-needed.sh
+++ b/bin/add-dsa-needed.sh
@@ -34,6 +34,18 @@ cleanup() {
}
trap cleanup EXIT
+pkgs_print() {
+ local pkg=$1
+ local include_suffix=$2
+ local suffix=$3
+
+ if $include_suffix ; then
+ printf "%s/%s\n--\n" "$pkg" "$suffix"
+ else
+ printf "%s\n--\n" "$pkg"
+ fi
+}
+
output=data/dsa-needed.txt
case "${1:-}" in
--stdout)

© 2014-2024 Faster IT GmbH | imprint | privacy policy