Mailinglist Archive: yast-devel (62 mails)

< Previous Next >
Re: [yast-devel] y2m use cases
# jdsn@xxxxxxx / 2014-03-25 11:32:51 +0100:
y2m co master ALL
y2m up ALL

If you want to do it in one step you could create a new y2m command.

Or even better (I only had the idea, but it never made it into y2m):
Make y2m a wrapper for any command, so something like this could work:

y2m ALL "git checkout master && git pull"
y2m FAV "echo 'Jon Doe' >> AUTHORS ; git commit -a -m 'update authors'"

i've been thinking about this, it's not much shorter than a for */ loop
and needs quoting. :( but yeah, we may end up with such a feature.

y2m FAV "echo 'Jon Doe' >> AUTHORS ; git commit -a -m 'update authors'"

vs.

for d in */; do echo 'Jon Doe' >> AUTHORS ; git commit -a -m 'update authors';
done

that's mere 12 characters of difference. also, notice the abstraction
leak ("git commit").

--
roman
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups