webbuild.js: improved 'Start from URL' filename parsing
This commit is contained in:
parent
16b2ff1ce9
commit
92a3d43064
@ -43,9 +43,18 @@ function suggestSpecName(url) {
|
||||
e != ".orig") break;
|
||||
specname=specname.substring(0,i);
|
||||
}
|
||||
i=specname.lastIndexOf('_');
|
||||
e=specname.substring(i);
|
||||
if (e == "_src" || e == "_orig") specname=specname.substring(0,i);
|
||||
i=specname.lastIndexOf('-');
|
||||
e=specname.substring(i);
|
||||
if (e == "-src" || e == "-orig") specname=specname.substring(0,i);
|
||||
if (specname.lastIndexOf('-') > 0) {
|
||||
version=specname.substring(specname.lastIndexOf('-')+1);
|
||||
specname=specname.substring(0,specname.lastIndexOf('-'));
|
||||
} else if (specname.lastIndexOf('_') > 0) {
|
||||
version=specname.substring(specname.lastIndexOf('_')+1);
|
||||
specname=specname.substring(0,specname.lastIndexOf('_'));
|
||||
}
|
||||
document.getElementById("speccreateurl").value=url;
|
||||
if (url.search("cpan.org") >= 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user