patch .bashrc only conditionally
authorPeter Palfrader <peter@palfrader.org>
Tue, 23 Mar 2010 15:10:01 +0000 (16:10 +0100)
committerPeter Palfrader <peter@palfrader.org>
Tue, 23 Mar 2010 15:10:01 +0000 (16:10 +0100)
input/howto/dchroot.creole

index d2128dc..1f38d61 100644 (file)
@@ -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