On Fri, Aug 9, 2013 at 7:02 AM, Ruediger Meier <sweet_f_a@gmx.de> wrote:
You can source it from a shell which is a great advantage but you can do it differently if you prefer,
Well, it's not that. One would have to have root to inject stuff there.
The issue is that of coupling. Sourcing it as a script, means a tiny otherwise inconsequential formatting error there would break all the scripts that source it, and for what, when grep can do just fine?
Of course it's bad that it could crash. Moreover you have to take care that the file may contain variables which you are using already in your script.
On the other hand your grep line would parse the file incorrectly. Most important, you should ignore comments,
Well, you could improve the regex to exclude comments. But if the intent is to detect openSUSE, why would any other distro include the string "openSUSE", in comments or not? -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org