On Thu, Mar 26, 2015 at 02:59:31PM +0100, David Macek wrote:
> On 26. 3. 2015 14:53, Dave Reisner wrote:
> >> +          for pkg in $pkgname; do
> > 
> > This can't be right -- you wanted "${pkgname[@]}" (with quotes).
> > 
> >> +                  rm -rf "$pkgdirbase/$pkg"
> >> +          done
> 
> I wasn't completely sure about it, but I don't think pkgnames can contain 
> whitespace and it is what Allan suggested. Maybe I wasn't supposed to copy it 
> verbatim.

No, pkgname cannot contain quotes, but that's a minor issue. "$pkgname"
will only expand to the equivalent of "${pkgname[0]}", leaving you with
directories still in "$pkgbasedir" after the loop terminates.

> Am I missing `local pkg` there somewhere?

Yes.

> 
> -- 
> David Macek
> 

Reply via email to