diff options
author | Ben Hutchings <benh@debian.org> | 2017-01-03 20:05:53 +0000 |
---|---|---|
committer | Ben Hutchings <benh@debian.org> | 2017-01-03 20:05:53 +0000 |
commit | ddfbbd6e246c322ca65285b58a361f58831769e6 (patch) | |
tree | 4c5911fc3b4825a40cda7454276ef65e1f9e3159 /bin/gen-DSA | |
parent | e3098d27cd868d9e791a1b923b13c1647f946713 (diff) |
bin/gen-DSA: Fix sorting of CVE IDs with last part >= 10000
Use sort -V, which seems to do the right thing.
git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@47702 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'bin/gen-DSA')
-rwxr-xr-x | bin/gen-DSA | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/gen-DSA b/bin/gen-DSA index 49e7d31fbd..da53bc1c70 100755 --- a/bin/gen-DSA +++ b/bin/gen-DSA @@ -80,7 +80,7 @@ tolower() { split_n_sort() { printf '%s' "$1" | sed -r 's/[ ,;]+/ /g;s/^ //' | tr ' ' "\n" | sort -u | - sort -n | tr "\n" ' ' | sed -r 's/\s+/ /g;s/\s$//' + sort ${2:--n} | tr "\n" ' ' | sed -r 's/\s+/ /g;s/\s$//' } _d_space() { @@ -185,7 +185,7 @@ done BUGNUM="$(split_n_sort "$BUGNUM")" -CVE="$(split_n_sort "$CVE")" +CVE="$(split_n_sort "$CVE" -V)" cve_spacing="$(right_space '' 17)" sed_cmd='s/((CVE-[0-9-]+[ ]+){4})(.+)$/\1\\n'"$cve_spacing"'\3/g;P;D' |