]> git.eshelyaron.com Git - emacs.git/commitdiff
Set group when installing, too
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 21 Jun 2018 20:29:15 +0000 (13:29 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 21 Jun 2018 20:30:23 +0000 (13:30 -0700)
From a patch by Ulrich Mueller in:
https://lists.gnu.org/r/emacs-devel/2018-06/msg00687.html
* Makefile.in (set_installuser): Also set the group, in order
to match install(1) behavior.  Also, don’t clutter stderr
with a diagnostic if ‘id’ is missing.

Makefile.in

index 52d44d9708f3295f3ecccb77aee96ffd20626b4d..4d7627ba09d07f80c297994e6e649a1af3673fac 100644 (file)
@@ -516,9 +516,11 @@ INSTALL_ARCH_INDEP_EXTRA = @INSTALL_ARCH_INDEP_EXTRA@
 ## https://lists.gnu.org/r/emacs-devel/2007-10/msg01672.html
 ## Needs to be the user running install, so configure can't set it.
 set_installuser=for installuser in $${LOGNAME} $${USERNAME} $${USER} \
-         `id -un 2> /dev/null`; do \
+         `(id -u) 2> /dev/null`; do \
          [ -n "$${installuser}" ] && break ; \
-       done
+       done; \
+       installgroup=`(id -g) 2>/dev/null` && [ -n "$$installgroup" ] && \
+         installuser=$$installuser:$$installgroup
 
 ### Install the files that are machine-independent.
 ### Most of them come straight from the distribution; the exception is