Move xpg4 'id' handling into test-exec.sh.

Handle replacement of 'id' the same way as we do other Portable specific
replacements in test-exec.sh.  This brings percent.sh back into sync
with upstream.
This commit is contained in:
Darren Tucker 2024-03-25 14:05:40 +11:00
parent 75d1d49ed1
commit 2d7964a03e
No known key found for this signature in database
2 changed files with 8 additions and 5 deletions

View File

@ -3,11 +3,6 @@
tid="percent expansions"
if [ -x "/usr/xpg4/bin/id" ]; then
PATH=/usr/xpg4/bin:$PATH
export PATH
fi
USER=`id -u -n`
USERID=`id -u`
HOST=`hostname | cut -f1 -d.`

View File

@ -392,6 +392,7 @@ have_prog()
jot() {
awk "BEGIN { for (i = $2; i < $2 + $1; i++) { printf \"%d\n\", i } exit }"
}
if [ ! -x "`which rev`" ]; then
rev()
{
@ -399,6 +400,13 @@ rev()
}
fi
if [ -x "/usr/xpg4/bin/id" ]; then
id()
{
/usr/xpg4/bin/id
}
fi
# Check whether preprocessor symbols are defined in config.h.
config_defined ()
{