Skip to content
Snippets Groups Projects
Commit c8da7fc5 authored by Simon McVittie's avatar Simon McVittie
Browse files

utils: Add a function to check for syntactically valid shell variables


This implements the naming rules for shell variables (as documented in
SUSv4/POSIX.1-2008, dash(1) and bash(1)), but its name is more general
because it coincides with many other languages' concept of identifiers.

We'll use this when emitting environment variables in a form that can
be passed to eval(1posix), similar to `dpkg-buildflags --export=sh`,
to filter out syntactically invalid variables.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 67daf3ab
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment