X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=_webi%2Fpackages.js;h=279e94056eb4f605b65062c923d18324c2cb080c;hb=681cccd4d5f2adb81470ee99ede927a6de896c3b;hp=603dc14b08a4af91904722c6e37b6a5007628800;hpb=5e0debf4c54c1e55476c1bc533c26db2b54d2f77;p=webi-installers%2F.git diff --git a/_webi/packages.js b/_webi/packages.js index 603dc14..279e940 100644 --- a/_webi/packages.js +++ b/_webi/packages.js @@ -1,5 +1,6 @@ 'use strict'; +var frontmarker = require('./frontmarker.js'); var shmatter = require('shmatter'); var fs = require('fs'); var path = require('path'); @@ -37,13 +38,13 @@ pkgs.create = function (Pkgs, basepath) { var yash = path.join(basepath, node, 'package.yash'); var curlbash = path.join(basepath, node, 'install.sh'); var readme = path.join(basepath, node, 'README.md'); - var winstall = path.join(basepath, node, 'install.bat'); + var winstall = path.join(basepath, node, 'install.ps1'); return Promise.all([ fs.promises .readFile(readme, 'utf-8') .then(function (txt) { // TODO - //return frontmarker.parse(txt); + return frontmarker.parse(txt); }) .catch(function (e) { if ('ENOENT' !== e.code && 'ENOTDIR' !== e.code) { @@ -79,12 +80,12 @@ pkgs.create = function (Pkgs, basepath) { // no winstaller winstall = ''; if ('ENOENT' !== e.code && 'ENOTDIR' !== e.code) { - console.error("failed to read '" + node + "/install.bat'"); + console.error("failed to read '" + node + "/install.ps1'"); console.error(e); } }) ]).then(function (items) { - var meta = items[1]; + var meta = items[0] || items[1]; if (!meta) { // doesn't exist return;