Skip to content

Instantly share code, notes, and snippets.

@Mailaender
Created August 26, 2017 14:12
Show Gist options
  • Save Mailaender/0d1b83680f51afcdceb1d24a430a32f2 to your computer and use it in GitHub Desktop.
Save Mailaender/0d1b83680f51afcdceb1d24a430a32f2 to your computer and use it in GitHub Desktop.
Used to convert OpenRA *.yaml files to *.oraml
#!/bin/bash
pushd mods/cnc/maps/
7z x '*.oramap' -o'*'
find . -name "*.oramap" -type f -delete
popd
pushd mods/ra/maps/
7z x '*.oramap' -o'*'
find . -name "*.oramap" -type f -delete
popd
pushd mods/d2k/maps/
7z x '*.oramap' -o'*'
find . -name "*.oramap" -type f -delete
popd
find . -name '*.yaml' -exec rename .yaml .oraml {} +
find mods -type f -exec sed -i 's/.yaml/.oraml/g' {} +
find OpenRA.* -type f -exec sed -i 's/mod.yaml/mod.oraml/g' {} +
find OpenRA.* -type f -exec sed -i 's/settings.yaml/settings.oraml/g' {} +
find OpenRA.* -type f -exec sed -i 's/map.yaml/map.oraml/g' {} +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment