paccache: use pacsort instead of sort -V

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dave Reisner 2011-08-07 19:46:41 -04:00 committed by Dan McGee
parent b283a1e065
commit 5136df0f39

View file

@ -164,7 +164,7 @@ summarize() {
else else
printf "%s$delim" "$pkg" printf "%s$delim" "$pkg"
fi fi
done < <(printf '%s\n' "$@" | sort -V) done < <(printf '%s\n' "$@" | pacsort)
fi fi
printf -v output 'finished dry run: %d candidates' "$filecount" printf -v output 'finished dry run: %d candidates' "$filecount"
fi fi
@ -265,7 +265,7 @@ cd "$cachedir" || die "failed to chdir to \`%s'" "$cachedir"
# note that these results are returned in an arbitrary order from awk, but # note that these results are returned in an arbitrary order from awk, but
# they'll be resorted (in summarize) iff we have a verbosity level set. # they'll be resorted (in summarize) iff we have a verbosity level set.
IFS=$'\n' read -r -d '' -a candidates < \ IFS=$'\n' read -r -d '' -a candidates < \
<(printf '%s\n' *.pkg.tar?(.+([^.])) | sort -V | <(printf '%s\n' *.pkg.tar?(.+([^.])) | pacsort |
pkgfilter "$keep" "$scanarch" \ pkgfilter "$keep" "$scanarch" \
"${#whitelist[*]}" "${whitelist[@]}" \ "${#whitelist[*]}" "${whitelist[@]}" \
"${#blacklist[*]}" "${blacklist[@]}") "${#blacklist[*]}" "${blacklist[@]}")