Skip to content

printf -v is not available in some shells #34

Description

@sparr

There are four instances of printf -v in funclib.sh (e.g. https://github.com/gnulib-modules/bootstrap/blob/master/build-aux/funclib.sh#L1156) which do not work in the dash shell. Although that file doesn't specify #!/bin/sh, the bootstrap script it ends up included in does. These printf -v var ... should be replaced with var="$(printf ...)" which will allow the tests in question to proceed on dash and potentially get a faster func_quotefast_eval than the fallback.

See: https://salsa.debian.org/debian/devscripts/-/blob/main/scripts/checkbashisms.pl?ref_type=heads#L706 (against which I'll be submitting a patch about the quoting shortly)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions