refactor: use new format for packs

This commit is contained in:
Johannes Loher 2023-06-25 16:04:27 +02:00
parent 4b97bde6d9
commit 032b006dd5
No known key found for this signature in database
GPG key ID: 7CB0A9FB553DA045
1546 changed files with 70353 additions and 79060 deletions

29
tools/packs.sh Executable file
View file

@ -0,0 +1,29 @@
#!/bin/bash
# SPDX-FileCopyrightText: 2023 Johannes Loher
#
# SPDX-License-Identifier: MIT
pack() {
packs=$(ls -D ./packs)
for pack in $packs; do
pnpm exec fvtt package pack --compendiumName=$pack --inputDirectory=./packs/$pack --outputDirectory=./dist/packs
done
}
unpack() {
packs=$(ls -D ./dist/packs)
echo $packs
for pack in $packs; do
pnpm exec fvtt package unpack --compendiumName=$pack --inputDirectory=./dist/packs --outputDirectory=./packs/$pack
done
}
case $1 in
"pack") pack
;;
"unpack") unpack
;;
*) echo "Usage: $0 <pack|unpack>"
;;
esac