On Tue, Apr 9, 2013 at 9:39 AM, Maxime Gauduin <[email protected]> wrote: >> > diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in >> > index d5b9077..0ac4975 100644 >> > --- a/scripts/makepkg.sh.in >> > +++ b/scripts/makepkg.sh.in >> > @@ -474,10 +474,21 @@ download_bzr() { >> > fi >> > elif (( ! HOLDVER )); then >> > # Make sure we are fetching the right repo >> > - if [[ "$url" != "$(bzr config parent_location -d $dir)" ]] ; >> > then >> > - error "$(gettext "%s is not a branch of %s")" "$dir" >> > "$url" >> > - plain "$(gettext "Aborting...")" >> > - exit 1 >> > + local distant_url="$(bzr info $url 2> /dev/null | grep root | >> > sed 's| branch root: ||')"
UMQ! + local distant_url="$(bzr info "$url" 2> /dev/null | sed -r 's| branch root: ||p')" >> >> Does this need an LC_ALL=C in the front? >> > > I tried several locales, it seems bzr info always outputs in english, > there should be no need for this. > >> > + local local_url="$(bzr config parent_location -d $dir)" UMQ! local local_url="$(bzr config parent_location -d "$dir")" >> > + if [[ ! -z "$distant_url" ]]; then >> >> if [[ -n ... ? >> > > Yeah, I put the ! in front without even thinking, -n is indeed better. > Use More Quotes™! cheers! mar77i
