On 23/05/10 21:20, Andres P wrote:
Signed-off-by: Andres P<aepd87@gmail.com> ---
Without a function, this would look like: local fmt="= %s\n" [[ $license ]]&& printf "license $fmt" "${license[@]}" [[ $replaces ]]&& printf "replaces $fmt" "${replaces[@]}" [[ $groups ]]&& printf "group $fmt" "${groups[@]}" [[ $depends ]]&& printf "depend $fmt" "${depends[@]}" [[ $optdepend ]]&& printf "optdepend $fmt" "${optdepends[@]}" [[ $conflict ]]&& printf "conflict $fmt" "${conflicts[@]}" [[ $provides ]]&& printf "provides $fmt" "${provides[@]}" [[ $backup ]]&& printf "backup $fmt" "${backup[@]}"
I'd prefer this version. In fact, removing the $fmt stuff would be better as it is only two characters longer and makes it a lot more readable. Again... commit messages... Allan