Skip to content

Commit

Permalink
License script.
Browse files Browse the repository at this point in the history
  • Loading branch information
hozuki committed Nov 11, 2017
1 parent 21dc6e6 commit 3ce5b92
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"description": "More than a simulator for [THE iDOLM@STER Million Live! Theater Days](https://millionlive.idolmaster.jp/theaterdays/).",
"main": "index.js",
"dependencies": {
"@types/chalk": "^2.2.0",
"@types/fs-extra": "^4.0.3",
"@types/glob": "^5.0.33",
"chalk": "^2.1.0",
Expand Down
7 changes: 6 additions & 1 deletion scripts/appveyor_copy_licenses.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

const path = require("path");
const fs = require("fs-extra");
const chalk = require("chalk");

const licensesPath = "docs/licenses";

Expand All @@ -10,7 +11,6 @@ const licensesPath = "docs/licenses";
*/
const licenseFiles = [
{ path: "LICENSE.txt", prefix: "MilliSim" },
{ path: "thirdparty/MimeTypeMap/LICENSE", prefix: "MimeTypeMap" },
{ path: "thirdparty/UnityStudioLib/LICENSE.txt", prefix: "UnityStudioLib" },
{ path: "thirdparty/UnityStudioLib/tracking/UnityStudio/License.md", prefix: "UnityStudio" }
];
Expand All @@ -19,6 +19,11 @@ const mapping = getMapping(licenseFiles);

let copying = 1;
for (const from in mapping) {
if (!fs.existsSync(from)) {
console.warn(chalk.yellow(`Warning: license file '${from}' is not found. Skipping.`));
continue;
}

const to = mapping[from];
console.info(`Copying ${from} to ${to}... (${copying}/${licenseFiles.length})`);
const dir = path.dirname(to);
Expand Down

0 comments on commit 3ce5b92

Please sign in to comment.