Created
January 14, 2026 12:19
-
-
Save krisk0/f57c2d594534b8e37395bd264259e985 to your computer and use it in GitHub Desktop.
Unpack CK3 modification, only .txt and yml. Get rid of mod_files/
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 | |
| [[ $2 == "" ]] && exit 1 | |
| [[ -s "$1" ]] || exit 1 | |
| 7z x "$1" -o$2 -r '*.txt' '*.yml' | |
| cd $2 | |
| for x in `find -type d -name mod_files` ; do | |
| ( | |
| cd `dirname $x` | |
| mv mod_files/* . | |
| rmdir mod_files | |
| ) | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment