Last active
October 18, 2016 03:34
-
-
Save justarandomgeek/7ca1d72c7530e08aecd48c682a5b22f9 to your computer and use it in GitHub Desktop.
Fix Factorio Mod Folder Names
This file contains 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 | |
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