Re: debootstrap doesn't use configured categories/components
2009/11/16 Kai Hendry <hendry@iki.fi>:
> echo $(set -- $LH_ARCHIVE_AREAS; for i in $@; do echo -n $i,; done)
Sigh, debootstrap --components seems to choke on a trailing comma. I
actually couldn't figure out how best to get rid of a trailing comma.
`cut` defeated me and no I'm not using sed.
Instead I propose a parameter expansion. I'm a little wary of
parameter expansions as I rarely seem them in other shells except
bash, hence aren't they bashisms?
DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS} --components
${LH_ARCHIVE_AREAS//[[:space:]]/,}"
There is still a trailing comma if someone does a trailing space, e.g.
--archive-areas "main contrib non-free "
Reply to: