mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-10-26 16:16:10 +01:00
Change to GNU Affero General Public License v3.0
This commit is contained in:
@@ -1,26 +1,18 @@
|
||||
#!/usr/bin/env node
|
||||
/*
|
||||
* MIT License
|
||||
* Copyright (c) 2020 - present Cloudogu GmbH
|
||||
*
|
||||
* Copyright (c) 2020-present Cloudogu GmbH and Contributors
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
*/
|
||||
|
||||
const fs = require("fs");
|
||||
@@ -29,17 +21,17 @@ const path = require("path");
|
||||
const commandDir = path.join(__dirname, "commands");
|
||||
const commands = fs
|
||||
.readdirSync(commandDir)
|
||||
.map(script => {
|
||||
.map((script) => {
|
||||
if (script.endsWith(".js")) {
|
||||
return script.replace(".js", "");
|
||||
}
|
||||
return undefined;
|
||||
})
|
||||
.filter(cmd => !!cmd);
|
||||
.filter((cmd) => !!cmd);
|
||||
|
||||
const args = process.argv.slice(2);
|
||||
|
||||
const commandIndex = args.findIndex(arg => {
|
||||
const commandIndex = args.findIndex((arg) => {
|
||||
return commands.includes(arg);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user