Moin, Michael Olbrich wrote: > From: Michael Olbrich <[email protected]> > > Signed-off-by: Michael Olbrich <[email protected]>
> [frog...@hardanger:OSELAS.BSP-Pengutronix-AllYes-trunk]$ ./p newpackage file
>
> ptxdist: creating a new 'file' package:
>
> ptxdist: enter package name.......: foo
> ptxdist: enter version number.....: bar
> ptxdist: enter package author.....: baz
> ./p: line 1113: read: -i: invalid option
> read: usage: read [-ers] [-u fd] [-t timeout] [-p prompt] [-a array] [-n
> nchars] [-d delim] [name ...]
That message looks scary :) How can this be fixed.
Marc
> ---
> bin/ptxdist | 9 +++++++--
> 1 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/bin/ptxdist b/bin/ptxdist
> index ac6b5ab..49e6556 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
> + "${iar...@]}" author
>
> local section
> read -e -p "${PTXDIST_LOG_PROMPT}enter package section....: " \
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
signature.asc
Description: OpenPGP digital signature
-- ptxdist mailing list [email protected]
