Alexis Ballier posted on Thu, 17 Sep 2015 18:36:06 +0200 as excerpted: > if [ "${PV#9999}" != "${PV}" ] ; then > SCM="git-r3" > fi
[and elsewhere] I've seen this asked in other eclass review contexts, but not for awhile... Since gentoo requires bash, why are you using old borne shell compatibility test logic? Why not use [[ ]] tests and avoid the need for the "", since bash then can treat variables as a unit and quotes are only needed if the tested strings include variable-external space (thus avoiding quote-logic errors if you accidentally forget the quotes)? (I used to use the compatibility single-[ variant myself, since the working code I originally learned bash with was explicitly borne- compatible sysv-init init-scripts. But once I began to appreciate the power of the double-[[ version, I soon vastly preferred it, except of course where compatibility is necessary, and it explicitly is not here, since gentoo and PMS explicitly specify bash.) -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman