projects
/
webi-installers
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make _example current, add rg for Windows
[webi-installers/.git]
/
_webi
/
normalize.js
diff --git
a/_webi/normalize.js
b/_webi/normalize.js
index 06c1ceec81e5f6043008698722a53cee60e344c0..0e06bcba72f12f9e9143a32a6f0a3b98e8dd74c9 100644
(file)
--- a/
_webi/normalize.js
+++ b/
_webi/normalize.js
@@
-84,6
+84,7
@@
function normalize(all) {
}
supported.arches[rel.arch] = true;
}
supported.arches[rel.arch] = true;
+ var tarExt;
if (!rel.ext) {
// pkg-v1.0.tar.gz => ['gz', 'tar', '0', 'pkg-v1']
// pkg-v1.0.tar => ['tar', '0' ,'pkg-v1']
if (!rel.ext) {
// pkg-v1.0.tar.gz => ['gz', 'tar', '0', 'pkg-v1']
// pkg-v1.0.tar => ['tar', '0' ,'pkg-v1']
@@
-96,8
+97,10
@@
function normalize(all) {
exts = exts.reverse().slice(0, 2);
if ('tar' === exts[1]) {
rel.ext = exts.reverse().join('.');
exts = exts.reverse().slice(0, 2);
if ('tar' === exts[1]) {
rel.ext = exts.reverse().join('.');
+ tarExt = 'tar';
} else if ('tgz' == exts[0]) {
rel.ext = 'tar.gz';
} else if ('tgz' == exts[0]) {
rel.ext = 'tar.gz';
+ tarExt = 'tar';
} else {
rel.ext = exts[0];
}
} else {
rel.ext = exts[0];
}
@@
-106,7
+109,7
@@
function normalize(all) {
rel.ext = 'exe';
}
}
rel.ext = 'exe';
}
}
- supported.formats[rel.ext] = true;
+ supported.formats[
tarExt ||
rel.ext] = true;
if (all.download) {
rel.download = all.download.replace(/{{ download }}/, rel.download);
if (all.download) {
rel.download = all.download.replace(/{{ download }}/, rel.download);