Skip to content

Instantly share code, notes, and snippets.

@krisk0
Created January 14, 2026 12:19
Show Gist options
  • Select an option

  • Save krisk0/f57c2d594534b8e37395bd264259e985 to your computer and use it in GitHub Desktop.

Select an option

Save krisk0/f57c2d594534b8e37395bd264259e985 to your computer and use it in GitHub Desktop.
Unpack CK3 modification, only .txt and yml. Get rid of mod_files/
#!/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