Initial Commit
This commit is contained in:
commit
66bd5a965a
6
.vscode/settings.json
vendored
Normal file
6
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"files.trimTrailingWhitespace": true,
|
||||
"files.insertFinalNewline": true,
|
||||
"files.trimFinalNewlines": true,
|
||||
"editor.renderFinalNewline": false
|
||||
}
|
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023-2024 Warén Group
|
||||
|
||||
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:
|
||||
|
||||
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.
|
10
config.yml
Normal file
10
config.yml
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
warengroup:
|
||||
domain: waren.io
|
||||
folder: warengroup
|
||||
cwinfo:
|
||||
domain: cwinfo.net
|
||||
folder: cwinfo
|
||||
cwchristerw:
|
||||
domain: christerwaren.fi
|
||||
folder: cwchristerw
|
33
generator.php
Normal file
33
generator.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
$base = file_get_contents(__DIR__."/src/base.sh");
|
||||
|
||||
|
||||
$dirs = [
|
||||
__DIR__.'/src/commands/*.sh',
|
||||
__DIR__.'/src/commands/*/*.sh',
|
||||
__DIR__.'/src/commands/*/*/*.sh'
|
||||
];
|
||||
|
||||
$codes = [];
|
||||
|
||||
foreach($dirs as $dir){
|
||||
foreach(glob($dir) as $file){
|
||||
$codes[$file] = file_get_contents($file);
|
||||
}
|
||||
}
|
||||
|
||||
$code = str_replace("{{ COMMANDS }}", implode("\n", $codes), $base);
|
||||
|
||||
try {
|
||||
$file = __DIR__.'/wx';
|
||||
$file = fopen($file, "w");
|
||||
fwrite($file, $code);
|
||||
fclose($file);
|
||||
|
||||
echo "Status: Successful";
|
||||
} catch (\Error $e) {
|
||||
echo "Status: Failed";
|
||||
}
|
||||
|
||||
?>
|
Loading…
Reference in New Issue
Block a user