Skip to content

Instantly share code, notes, and snippets.

@krisk0
Last active October 11, 2025 13:36
Show Gist options
  • Select an option

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

Select an option

Save krisk0/2a63d39267f8e3c0588eef222ee14160 to your computer and use it in GitHub Desktop.
Automate CK3 .mod creation
#!/bin/bash
file_name=`find -maxdepth 1 -type d|grep -v '\.$'`
file_name=${file_name##./}
mod_name=`echo $file_name|sed 's:_: :g'`
mod_name=${mod_name^}
(
printf 'version="1.0"\ntags={\n\t"Fixes"\n}\n'
printf 'name="%s"\n' "$mod_name"
echo 'supported_version="1.17.*"'
printf 'path="mod/%s/"\n' $file_name
) > $file_name.mod
grep -v ^path= $file_name.mod > $file_name/descriptor.mod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment