mirror of
https://gitgud.io/BondageProjects/Bondage-College.git
synced 2025-04-25 17:59:34 +00:00
Possibly the gulp minification pipeline is broken; I can't spare the disk space — or the time — to run that at the moment. CI and the changelog generator are fine though. Only remains a few errors in AssetCheck, which look legitimate, but at that point I'm done playing packaging games.
31 lines
680 B
JavaScript
31 lines
680 B
JavaScript
import fs from "fs";
|
|
import { BASE_PATH, error } from "./Common.js";
|
|
|
|
/**
|
|
* @param {string} root
|
|
*/
|
|
function checkFileCasing(root) {
|
|
/** @type {Set<string>} */
|
|
const files = new Set();
|
|
/** @type {string[]} */
|
|
const invalid = [];
|
|
for (const _file of fs.readdirSync(root, { encoding: "utf8", recursive: true })) {
|
|
const file = _file.toLowerCase();
|
|
if (files.has(file)) {
|
|
invalid.push(_file);
|
|
}
|
|
files.add(file);
|
|
}
|
|
|
|
if (invalid.length) {
|
|
invalid.sort();
|
|
error(
|
|
`found ${invalid.length} duplicate files with different upper- and/or lower-casing: `
|
|
+ `${JSON.stringify(invalid, undefined, 4)}`,
|
|
);
|
|
}
|
|
}
|
|
|
|
(function () {
|
|
checkFileCasing(BASE_PATH);
|
|
}());
|