2023-06-25 16:04:27 +02:00
|
|
|
#!/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)
|
2023-06-25 23:55:08 +02:00
|
|
|
rm -rf ./packs/*
|
2023-06-25 16:04:27 +02:00
|
|
|
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
|