adding empty constructors

Here is a kooky cli I cooked up to add empty constructors to all the model objects in the project that have explicit constructors but no empty constructors…

vim $( for o in $( for m in $( nocvs |grep /model/ ) ; do c=$( echo ${m} | sed ‘s,.*/,,;s,\..*,,’ ) ; grep -c “public ${c}()” ${m} | sed “s,^0$,${m},” ; done | grep src ) ; do c=$( echo ${o} | sed ‘s,.*/,,;s,\..*,,’ ) ; grep -l “public ${c}” ${o} ; done )

Madness!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: