Created
August 3, 2026 04:55
-
-
Save krisk0/afb2676709eb586cbcc22c73a1105295 to your computer and use it in GitHub Desktop.
Unpack CK3 mod, keep only .txt .yml .gui, get rid of some localizations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -ex | |
| [[ $2 == "" ]] && exit 1 | |
| [[ -s "$1" ]] || exit 1 | |
| 7z x "$1" -o$2 -r '*.txt' '*.yml' '*.gui' | |
| cd $2 | |
| for x in `find -type d -name mod_files` ; do | |
| ( | |
| cd `dirname $x` | |
| mv mod_files/* . | |
| rmdir mod_files | |
| ) | |
| done | |
| l=`find -name localization -type d 2>/dev/null || true` | |
| [[ -d "$l" ]] && ( | |
| cd $l | |
| GLOBIGNORE="english:russian:languages.yml" | |
| rm -rf * | |
| unset GLOBIGNORE | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment