Sort find output and avoid duplicated /

Some find implementations will produce results like "dir//a" if given
"find dir/".
This commit is contained in:
Lucas 2022-09-03 13:57:43 +00:00
parent 09e8f9650d
commit fb6454a300
1 changed files with 2 additions and 1 deletions

View File

@ -139,7 +139,8 @@ main_issue()
if [ ! -d "$PATH_PUBKEYS_DIR" ]; then
exit 0
fi
find "$PATH_PUBKEYS_DIR/" -type f -name '*.pub' ! -name '*-cert.pub' | {
find "$PATH_PUBKEYS_DIR" -type f -name '*.pub' ! -name '*-cert.pub' |
sort | {
ca_comment=$(get_ca_sk_comment_from_pk "$PATH_CA_PUB")
: ${ca_comment:=cassh}