Fix sorting when normalizing package list.
This commit is contained in:
parent
9a4f0f7d01
commit
fa7091e9a8
1 changed files with 3 additions and 2 deletions
3
lib.sh
3
lib.sh
|
@ -5,7 +5,8 @@ function normalize_package_list {
|
||||||
local stripped=$(echo "${1}" | sed 's/,//g')
|
local stripped=$(echo "${1}" | sed 's/,//g')
|
||||||
# Remove extraneous spaces at the middle, beginning, and end.
|
# Remove extraneous spaces at the middle, beginning, and end.
|
||||||
local trimmed="$(echo "${stripped}" | sed 's/\s\+/ /g; s/^\s\+//g; s/\s\+$//g')"
|
local trimmed="$(echo "${stripped}" | sed 's/\s\+/ /g; s/^\s\+//g; s/\s\+$//g')"
|
||||||
echo "${trimmed}" | sort
|
local sorted="$(echo ${trimmed} | tr ' ' '\n' | sort | tr '\n' ' ')"
|
||||||
|
echo "${sorted}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Split fully qualified package into name and version
|
# Split fully qualified package into name and version
|
||||||
|
|
Loading…
Reference in a new issue