jsha / gpg-download-verifier

Verify various styles of GPG download signatures using TOFU.
7 stars 4 forks source link

correctly match package names with '-' and '_' #3

Closed bdd closed 2 years ago

bdd commented 9 years ago
BEFORE:
% echo /a/b/c/d/foo-bar-10.9.8-7.ext | perl -pe 's|.*/||; s|[^[:alnum:]].*||'
foo

AFTER:
% echo /a/b/c/d/foo-bar-10.9.8-7.ext | perl -pe 's|.*/([-_[:alnum:]]+)-[[:digit:]]+.*|\1|'
foo-bar

/------------\
| AS SEEN ON |
| |___| |  | |
|  | |  \  / |
|  |_|   \/  |
\____________/