On Tuesday, 6 June 2017 10:03 Michal Marek wrote:
On 2017-06-06 09:54, Michal Kubecek wrote:
On Tuesday, 6 June 2017 9:32 Andreas Schwab wrote:
% should be doubled.
+ glob=${spec#*:} + : >../$pkg.list + for dts in $glob; do + if test ! -e "$dts"; then + continue + fi + if test ! -s ../$pkg.list; then + cp ../boilerplate.list ../$pkg.list + fi + target=${dts%*.dts}
Likewise.
I may be missing something but wouldn't ${dts%%*.dts} expand to empty string whenever $dts ends with ".dts"? Is this what we wan't here?
The % removes the shortest matching pattern, so this correctly removes the .dts suffix. But I agree that it is extremely confusing, I will remove the redundant '*'.
One '%' does (so that ${dts%*.dts} is indeed equivalent to ${dts%.dts}). But Andreas suggested to replace it with '%%' which would cut off the longest match - and that would be the whole string whenever it ends with ".dts". Michal -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org