fix: 权限,兼容性优化

This commit is contained in:
msojocs 2022-02-27 21:05:46 +08:00
parent e9c717dd5d
commit 8c67f5ad52
2 changed files with 7 additions and 2 deletions

View File

@ -37,6 +37,7 @@ if [[ $NO_WINE == 'true' ]];then
\cp -rf "${srcdir}/compiler/nodejs/wcsc" "${package_dir}/js/vendor/wcsc"
\cp -rf "${tmp_dir}/node_modules/miniprogram-compiler/bin/linux/wcc" "${package_dir}/js/vendor/wcc.bin"
\cp -rf "${tmp_dir}/node_modules/miniprogram-compiler/bin/linux/wcsc" "${package_dir}/js/vendor/wcsc.bin"
cd "${package_dir}/js/vendor" && chmod 0755 wcc.bin wcsc.bin
node "${package_dir}/js/vendor/generatemd5.js"
current=`date "+%Y-%m-%d %H:%M:%S"`

View File

@ -5,6 +5,7 @@ const fs = require("fs");
const parseFile = function (path) {
if (!fs.existsSync(path)) {
console.error(`${path}文件不存在`)
return;
}
let content = JSON.parse(fs.readFileSync(path, "utf8"));
@ -17,5 +18,8 @@ const parseFile = function (path) {
};
parseFile(path.resolve(__dirname, "../package.nw/package.json"));
parseFile(path.resolve(__dirname, "../package.nw/package-lock.json"));
let basedir = __dirname;
if(undefined !== process.env['srcdir'])
basedir = process.env['srcdir'] + '/tools';
parseFile(path.resolve(basedir, "../package.nw/package.json"));
parseFile(path.resolve(basedir, "../package.nw/package-lock.json"));