Commit Graph

3 Commits

Author SHA1 Message Date
Sławomir Nizio 1c7473fd79 [molecules] modify.pl: fix commas in sorting with delete 2011-10-14 07:05:51 +02:00
Sławomir Nizio 5e8f2e926b [molecules] modify.pl: improvement&fix 2011-10-12 23:26:40 +02:00
Sławomir Nizio 22b3387cb6 [molecules] add a script to update molecule/particle files
This is a silly script to modify .common (molecules) and .particle
files.
It can be used to modify (even automatic) another files with similar format too.
For .common files it uses "packages_to_add:" section, and for .particle
"packages:", but any can be used using --section.
Commiting it to this git repository because it could be most useful
here.

When adding an item it aborts if encountered file fragment is not sorted
(can be overridden with --force).
It can sort entries in a "section" too (--sort).
It can delete an item instead of adding (--delete).
Unless --noask is specified, displays diff and asks for confirmation.

usage examples:
	./modify.pl kde.common dev-util/geany
	./modify.pl --sort kde.common dev-util/geany
	./modify.pl --sort kde.common
	./modify.pl --delete kde.common x11-terms/xterm

I don't know if it'll be used. I've made it for fun.
Feel free to (re)move
it to another directory, like scripts/ (I think it fits
better here).
2011-10-12 20:02:32 +02:00