summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2010-06-03 13:02:44 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2010-06-09 16:48:29 +0200
commit5dfa5e72f5a56fd2e4823dd645b45e5208f513b6 (patch)
treea2c5b458414f44a5ca16885471ae3b16f95b378b
parent597e6016ef21a09fbe220d2bdaf840af29336bb8 (diff)
downloadptxdist-5dfa5e72f5a56fd2e4823dd645b45e5208f513b6.tar.gz
ptxdist-5dfa5e72f5a56fd2e4823dd645b45e5208f513b6.tar.xz
[ptxdist] in older bash versions read does not support "-i"
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> (cherry picked from commit 531e88a649f10e4e05b6fa6059ef7c5612777ee8) Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rwxr-xr-xbin/ptxdist9
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/ptxdist b/bin/ptxdist
index ac6b5ab8e..49e65560a 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -1099,10 +1099,15 @@ newpackage() {
;;
esac
+ local iargs
+ if echo | read -i foo -p bar -e > /dev/null 2>&1; then
+ iargs=("-i" "${PTXCONF_SETUP_USER_NAME} <${PTXCONF_SETUP_USER_EMAIL}>")
+ else
+ iargs=()
+ fi
local author
read -e -p "${PTXDIST_LOG_PROMPT}enter package author.....: " \
- -i "${PTXCONF_SETUP_USER_NAME} <${PTXCONF_SETUP_USER_EMAIL}>" \
- author
+ "${iargs[@]}" author
local section
read -e -p "${PTXDIST_LOG_PROMPT}enter package section....: " \