Skip to content

Instantly share code, notes, and snippets.

@justarandomgeek
Last active October 18, 2016 03:34
Show Gist options
  • Save justarandomgeek/7ca1d72c7530e08aecd48c682a5b22f9 to your computer and use it in GitHub Desktop.
Save justarandomgeek/7ca1d72c7530e08aecd48c682a5b22f9 to your computer and use it in GitHub Desktop.
Fix Factorio Mod Folder Names
#!/bin/bash
for mod in *; do
if [ -d "$mod" ]; then
newmod=`cat $mod/info.json|jq -r '.name+"_"+.version'`
echo $mod $newmod
[ "$mod" != "$newmod" ] && mv "$mod" "$newmod"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment