Skip to content

Instantly share code, notes, and snippets.

@grappler grappler/potomo.sh
Created Oct 12, 2013

Embed
What would you like to do?
Bash file to create .mo files without keeping the .po files.
#! /bin/sh
for file in `/usr/bin/find . -name '*.po'` ; do /usr/bin/msgfmt -o ${file/.po/.mo} $file && /usr/bin/rm $file ; done
@fxbenard

This comment has been minimized.

Copy link

commented Oct 13, 2013

Nope it's not working for me, is it for you? It erases the content of the po not the file :)

@fxbenard

This comment has been minimized.

Copy link

commented Oct 13, 2013

! /bin/sh

for file in find . -name "*.po" ; do msgfmt -o ${file/.po/.mo} $file && rm $file ; done

is working beautifully, thanks man

@grappler

This comment has been minimized.

Copy link
Owner Author

commented Oct 13, 2013

Great, I did not have time to test the first solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.