Skip to content

Commit

Permalink
api: remove_repofile_if_unused remove single space requirement afte…
Browse files Browse the repository at this point in the history
…r field colon

it is convention to follow a field separator colon by a space and then the package name but the specification allows for no space or any number of spaces or tab characters
  • Loading branch information
theofficialgman committed Feb 26, 2024
1 parent 76c4f24 commit ee69eb1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,9 @@ remove_repofile_if_unused() { #Given a sources.list.d file, delete it if nothing
# determine what uri, suite, and components are in a file
#each stanza can only have one matching section. if there are multiple matches the last one is used
#case should be ignored for fields
local uri="$(sed -n "$line_start","$line_end"p "$file" | grep -v '^#' | grep -i '^URIs: ' | sed 's/URIs: //Ig' | tail -1)"
local suites="$(sed -n "$line_start","$line_end"p "$file" | grep -v '^#' | grep -i '^Suites: ' | sed 's/Suites: //Ig' | tail -1)"
local components="$(sed -n "$line_start","$line_end"p "$file" | grep -v '^#' | grep -i '^Components: ' | sed 's/Components: //Ig' | tail -1)"
local uri="$(sed -n "$line_start","$line_end"p "$file" | grep -v '^#' | grep -i '^URIs:' | sed 's/URIs://Ig' | awk '{print $1}' | tail -1)"
local suites="$(sed -n "$line_start","$line_end"p "$file" | grep -v '^#' | grep -i '^Suites:' | sed 's/Suites://Ig' | awk '{print $1}' | tail -1)"
local components="$(sed -n "$line_start","$line_end"p "$file" | grep -v '^#' | grep -i '^Components:' | sed 's/Components://Ig' | awk '{print $1}' | tail -1)"
local IFS=' '
for suite in $suites ;do
if [ -z "$components" ]; then
Expand Down

0 comments on commit ee69eb1

Please sign in to comment.