[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Set also the group of installed files
From: |
Ulrich Mueller |
Subject: |
Re: [PATCH] Set also the group of installed files |
Date: |
Thu, 21 Jun 2018 17:27:28 +0200 |
>>>>> On Thu, 21 Jun 2018, Eli Zaretskii wrote:
>> --- a/Makefile.in
>> +++ b/Makefile.in
>> @@ -518,7 +518,10 @@ INSTALL_ARCH_INDEP_EXTRA = @INSTALL_ARCH_INDEP_EXTRA@
>> set_installuser=for installuser in $${LOGNAME} $${USERNAME} $${USER} \
>> `id -un 2> /dev/null`; do \
>> [ -n "$${installuser}" ] && break ; \
>> - done
>> + done; \
>> + installgroup=$$(id -gn 2>/dev/null); \
>> + [ -n "$${installgroup}" ] && \
>> + installuser="$${installuser}:$${installgroup}"
> Is 'id' sufficiently portable to use it here?
The -g and -n options are specified by POSIX. I have only tested it on
GNU/Linux and FreeBSD though.
Also it should fall back to the current behaviour if "id" errors
out for some reason.