Patchwork [1,of,5,STABLE,V2] dockerdeb: redirect 'cd' in export command to /dev/null

login
register
mail settings
Submitter Sean Farley
Date April 20, 2016, 6:01 p.m.
Message ID <a4609d5e2af8b208f484.1461175314@laptop.office.atlassian.com>
Download mbox | patch
Permalink /patch/14738/
State Accepted
Headers show

Comments

Sean Farley - April 20, 2016, 6:01 p.m.
# HG changeset patch
# User Sean Farley <sean@farley.io>
# Date 1460914600 25200
#      Sun Apr 17 10:36:40 2016 -0700
# Branch stable
# Node ID a4609d5e2af8b208f4843fc4bffcd3fb15fede0d
# Parent  97811ff7964710d32cae951df1da8019b46151a2
# EXP-Topic ppa
dockerdeb: redirect 'cd' in export command to /dev/null

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. So, let's just redirect the meaningless output.

Patch

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=$(cd $BUILDDIR/.. > /dev/null; pwd)
 
 checkdocker
 
 DISTID="$1"
 CODENAME="$2"