[PATCH 1 of 5 STABLE V2] dockerdeb: elimate 'cd' in export command

Yuya Nishihara yuya at tcha.org
Mon Apr 18 09:13:24 EDT 2016


On Sun, 17 Apr 2016 11:14:15 -0700, Sean Farley wrote:
> # HG changeset patch
> # User Sean Farley <sean at farley.io>
> # Date 1460914600 25200
> #      Sun Apr 17 10:36:40 2016 -0700
> # Branch stable
> # Node ID b7fb0360f172f06477a07bf510aca176109c0cba
> # Parent  e442b628bfe6485d57ab4f10f941b89e96f04b05
> # EXP-Topic ppa
> dockerdeb: elimate 'cd' in export command
> 
> This had the unfortunate side effect of causing the environment to have a
> newline due to the fact that some 'cd' outputs the result of the directory
> change.
> 
> diff --git a/contrib/dockerdeb b/contrib/dockerdeb
> --- a/contrib/dockerdeb
> +++ b/contrib/dockerdeb
> @@ -2,11 +2,11 @@
>  
>  . $(dirname $0)/dockerlib.sh
>  . $(dirname $0)/packagelib.sh
>  
>  BUILDDIR=$(dirname $0)
> -export ROOTDIR=$(cd $BUILDDIR/..; pwd)
> +export ROOTDIR=$(dirname $BUILDDIR)

It won't work if you do

  $ cd contrib
  $ ./dockerdeb


More information about the Mercurial-devel mailing list