[mod] auf ivaldi umgestellt
This commit is contained in:
parent
d116b4c04c
commit
b7cababbb5
40
ivaldi.json
Normal file
40
ivaldi.json
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"version": "1",
|
||||
"name": "mimir",
|
||||
"kind": "node",
|
||||
"libs": {
|
||||
"plankton": [
|
||||
"base",
|
||||
"conf",
|
||||
"file",
|
||||
"call",
|
||||
"json",
|
||||
"string",
|
||||
"args",
|
||||
"log"
|
||||
]
|
||||
},
|
||||
"core": [
|
||||
"helpers/borg.ts",
|
||||
"conf.ts",
|
||||
"logic/serialization/_abstract.ts",
|
||||
"logic/serialization/files.ts",
|
||||
"logic/serialization/postgresql_dump.ts",
|
||||
"logic/serialization/_factory.ts",
|
||||
"logic/transfer/_abstract.ts",
|
||||
"logic/transfer/local.ts",
|
||||
"logic/transfer/borg.ts",
|
||||
"logic/transfer/_factory.ts"
|
||||
],
|
||||
"apps": [
|
||||
{
|
||||
"name": "main",
|
||||
"sources": [
|
||||
"main.ts"
|
||||
],
|
||||
"destination": "mimir",
|
||||
"head": "#!/usr/bin/env node",
|
||||
"executable": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -12,7 +12,7 @@ erstellt Backup-Skripte anhand einer JSON-Beschreibung
|
|||
|
||||
### Anweisungen
|
||||
|
||||
- `tools/build` (Schalter `-h` nutzer für Hilfe)
|
||||
- `tools/ivaldi build`
|
||||
|
||||
|
||||
## Verwendung
|
||||
|
|
@ -43,7 +43,7 @@ mimir -c conf.mmr.json run
|
|||
|
||||
Hier könnte die Ausgabe bspw. wie folgt aussehen:
|
||||
|
||||
```
|
||||
```sh
|
||||
## images
|
||||
|
||||
echo '-- images'
|
||||
|
|
|
|||
55
tools/build
55
tools/build
|
|
@ -1,55 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys as _sys
|
||||
import os as _os
|
||||
import argparse as _argparse
|
||||
|
||||
|
||||
def main():
|
||||
## args
|
||||
argument_parser = _argparse.ArgumentParser()
|
||||
argument_parser.add_argument(
|
||||
"-c",
|
||||
"--conf-path",
|
||||
type = str,
|
||||
default = None,
|
||||
metavar = "<conf-path>",
|
||||
help = "conf path",
|
||||
)
|
||||
argument_parser.add_argument(
|
||||
"-o",
|
||||
"--output-directory",
|
||||
type = str,
|
||||
default = "/tmp/mimir",
|
||||
metavar = "<output-directory>",
|
||||
help = "output directory",
|
||||
)
|
||||
args = argument_parser.parse_args()
|
||||
|
||||
## exec
|
||||
targets = []
|
||||
targets.append("main")
|
||||
if True:
|
||||
_os.system(
|
||||
"make dir_build=%s --file=tools/makefile %s"
|
||||
% (
|
||||
args.output_directory,
|
||||
" ".join(targets),
|
||||
)
|
||||
)
|
||||
if True:
|
||||
if (args.conf_path is None):
|
||||
pass
|
||||
else:
|
||||
_os.system(
|
||||
"cp %s %s/mmr.json"
|
||||
% (
|
||||
args.conf_path,
|
||||
args.output_directory,
|
||||
)
|
||||
)
|
||||
_sys.stdout.write("%s\n" % args.output_directory)
|
||||
|
||||
|
||||
main()
|
||||
|
||||
5805
tools/ivaldi
Executable file
5805
tools/ivaldi
Executable file
File diff suppressed because it is too large
Load diff
|
|
@ -1,68 +0,0 @@
|
|||
# Espe | Ein schlichtes Werkzeug zur Mitglieder-Verwaltung | Backend
|
||||
# Copyright (C) 2024 Christian Fraß
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
|
||||
# License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with this program. If not, see
|
||||
# <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
## consts
|
||||
|
||||
dir_lib := lib
|
||||
dir_source := source
|
||||
dir_temp := /tmp/mimir-temp
|
||||
dir_build := build
|
||||
dir_tools := tools
|
||||
|
||||
cmd_log := echo "--"
|
||||
cmd_cat := cat
|
||||
cmd_chmod := chmod
|
||||
cmd_mkdir := mkdir -p
|
||||
cmd_cp := cp
|
||||
cmd_tsc := tsc
|
||||
|
||||
|
||||
## rules
|
||||
|
||||
.PHONY: default
|
||||
default: main
|
||||
|
||||
.PHONY: main
|
||||
main: ${dir_build}/mimir
|
||||
|
||||
${dir_temp}/head.js:
|
||||
@ ${cmd_log} "head …"
|
||||
@ ${cmd_mkdir} $(dir $@)
|
||||
@ echo "#!/usr/bin/env node\n" > $@
|
||||
|
||||
${dir_temp}/mimir-raw.js: \
|
||||
${dir_lib}/plankton/plankton.d.ts \
|
||||
${dir_source}/helpers/borg.ts \
|
||||
${dir_source}/conf.ts \
|
||||
${dir_source}/logic/serialization/_abstract.ts \
|
||||
${dir_source}/logic/serialization/files.ts \
|
||||
${dir_source}/logic/serialization/postgresql_dump.ts \
|
||||
${dir_source}/logic/serialization/_factory.ts \
|
||||
${dir_source}/logic/transfer/_abstract.ts \
|
||||
${dir_source}/logic/transfer/local.ts \
|
||||
${dir_source}/logic/transfer/borg.ts \
|
||||
${dir_source}/logic/transfer/_factory.ts \
|
||||
${dir_source}/main.ts
|
||||
@ ${cmd_log} "compile …"
|
||||
@ ${cmd_mkdir} $(dir $@)
|
||||
@ ${cmd_tsc} --lib es2020 --strict $^ --outFile $@
|
||||
|
||||
${dir_build}/mimir: \
|
||||
${dir_temp}/head.js \
|
||||
${dir_lib}/plankton/plankton.js \
|
||||
${dir_temp}/mimir-raw.js
|
||||
@ ${cmd_log} "link …"
|
||||
@ ${cmd_mkdir} $(dir $@)
|
||||
@ ${cmd_cat} $^ > $@
|
||||
@ ${cmd_chmod} +x $@
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
## consts
|
||||
|
||||
dir=$(pwd)/lib/plankton
|
||||
|
||||
modules=""
|
||||
modules="${modules} base"
|
||||
modules="${modules} conf"
|
||||
modules="${modules} file"
|
||||
modules="${modules} call"
|
||||
modules="${modules} json"
|
||||
modules="${modules} string"
|
||||
modules="${modules} args"
|
||||
modules="${modules} log"
|
||||
|
||||
|
||||
## exec
|
||||
|
||||
mkdir -p ${dir}
|
||||
mkdir /tmp/sandbox -p
|
||||
cd /tmp/sandbox
|
||||
ptk fetch node ${modules}
|
||||
schwamm --include=/tmp/sandbox/plankton.swm.json --output=dump:logic-decl > ${dir}/plankton.d.ts
|
||||
schwamm --include=/tmp/sandbox/plankton.swm.json --output=dump:logic-impl > ${dir}/plankton.js
|
||||
exit
|
||||
|
||||
mkdir -p ${dir}
|
||||
cd ${dir}
|
||||
ptk bundle node ${modules}
|
||||
cd - > /dev/null
|
||||
Loading…
Reference in a new issue