mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Bernhard Walle <bernhard@bwalle.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] ptxdist: Don't assume that we have a bashrc
Date: Tue, 20 Mar 2012 20:46:45 +0100	[thread overview]
Message-ID: <1332272805-94650-1-git-send-email-bernhard@bwalle.de> (raw)

Usually there is one, but don't print an error if there is no one.

Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
---
 bin/ptxdist |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/ptxdist b/bin/ptxdist
index 440a7aa..37ab098 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -1656,8 +1656,8 @@ parse_second()
 			if [ ${#} -eq 0 ]; then
 				local bashrc="${PTXDIST_TEMPDIR}/bashrc"
 				cat > "${bashrc}" <<EOF
-. /etc/bash.bashrc
-. ~/.bashrc
+[ -r /etc/bash.bashrc ] && . /etc/bash.bashrc
+[ -r ~/.bashrc ] && . ~/.bashrc
 PS1="[ptx] \${PS1}"
 PATH="${PATH}"
 EOF
-- 
1.7.9.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

             reply	other threads:[~2012-03-20 19:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-20 19:46 Bernhard Walle [this message]
2012-03-20 22:15 ` Alexander Dahl
2012-03-21  6:17   ` Bernhard Walle
2012-03-21  8:40     ` Alexander Dahl
2012-03-21  8:43       ` Bernhard Walle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1332272805-94650-1-git-send-email-bernhard@bwalle.de \
    --to=bernhard@bwalle.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox