diff options
| author | root <root@dc13.lemmi> | 2020-07-21 10:00:46 +0200 |
|---|---|---|
| committer | root <root@dc13.lemmi> | 2020-07-21 10:00:46 +0200 |
| commit | 1192c4575ea7afdf38e3fa0df4587a08620af11e (patch) | |
| tree | 6910a62487c282d0840d2e668aa7eb40b7c8a3fd /project/scripts/patch-all-messages.sh | |
| parent | 76de8a89f7c1d1b4522eb66e8f89d248e8c1781f (diff) | |
SZS v2.18a
Diffstat (limited to 'project/scripts/patch-all-messages.sh')
| -rw-r--r-- | project/scripts/patch-all-messages.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/project/scripts/patch-all-messages.sh b/project/scripts/patch-all-messages.sh new file mode 100644 index 0000000..845260c --- /dev/null +++ b/project/scripts/patch-all-messages.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +#--- pre definitions: enter your local settings + +# This is the directory with all message files (/Scene/UI) +SRC_UI_DIR="./ui" + +# and this is the destination directory. If it is the same as the source +# than all files are replaced by the patched version. +DEST_UI_DIR="$SRC_UI_DIR" + +# This is the path to the message file of above: +PATCH_FILE="bmg-patch.txt" + +# Remove the the hash ('#') of the second line for fast operation. +# This makes the file about 25-30% larger but the operation is much faster +FAST= +#FAST=--fast + +#--- more automated setup + +TEMP="$(mktemp -d)" || exit 1 + +#--- patch it in 3 steps: extract szs + patch bmg + create new szs + +wszst extract --quiet "$SRC_UI_DIR/"*_?.szs --dest "$TEMP/%N.d" +wbmgt patch --quiet "$TEMP/"*.d/message/*.bmg --patch "replace,$PATCH_FILE" +wszst create --quiet --remove "$TEMP/"*.d --dest "$DEST_UI_DIR" $FAST + +#--- clean up (remove temp dir) + +rm -rf "$TEMP" |
