diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2010-06-03 13:02:44 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2010-06-03 13:03:35 +0200 |
commit | 531e88a649f10e4e05b6fa6059ef7c5612777ee8 (patch) | |
tree | 6112315ac7520cb7d9a185b098c45a428e1ef746 /bin | |
parent | 03a8e2f7157a70519493d3a4aa466dad09584afa (diff) | |
download | ptxdist-531e88a649f10e4e05b6fa6059ef7c5612777ee8.tar.gz ptxdist-531e88a649f10e4e05b6fa6059ef7c5612777ee8.tar.xz |
[ptxdist] in older bash versions read does not support "-i"
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ptxdist | 9 |
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....: " \ |