From: Peter Palfrader Date: Tue, 23 Mar 2010 15:10:01 +0000 (+0100) Subject: patch .bashrc only conditionally X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fdsa-wiki.git;a=commitdiff_plain;h=2d843b8eb0ebaf693a2c65b7b95ba13ce700ec6c patch .bashrc only conditionally --- diff --git a/input/howto/dchroot.creole b/input/howto/dchroot.creole index d2128dc..1f38d61 100644 --- a/input/howto/dchroot.creole +++ b/input/howto/dchroot.creole @@ -26,7 +26,7 @@ chroot $DIST echo $DIST > /etc/debian_chroot # change root's .bashrc: - patch /root/.bashrc << 'EOF' + grep -q debian.chroot /etc/bash.bashrc || patch /root/.bashrc << 'EOF' @@ -3,2 +3,6 @@ export PS1='\h:\w\$ ' +if [ -e /etc/debian_chroot ]; then