Makefile: config file is touched only if it doesn't exist yet, owner and file rights...
authorrohieb <devnull@localhost>
Wed, 23 Jul 2008 15:34:13 +0000 (17:34 +0200)
committerrohieb <devnull@localhost>
Wed, 23 Jul 2008 15:34:13 +0000 (17:34 +0200)
uG: changed Makefile

Makefile

index 5ddf5b6..c9bf658 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -50,7 +50,11 @@ links:
        # includes\r
        $(MKDIR) $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation\r
        $(LN) includes/*.inc $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/\r
-       touch $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc\r
+       if [ ! -e $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc ] ; then touch $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc; fi\r
+ifeq ($(shell id -u),0)\r
+       chmod g+w $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc\r
+       chown www-data $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc\r
+endif\r
        \r
        # i18n\r
        if [ ! -d $(DESTDIR)/usr/share/iserv/locale/de/ ]; then $(MKDIR) $(DESTDIR)/usr/share/iserv/locale/de/; fi\r
@@ -86,10 +90,9 @@ sourcedoc:
 \r
 # install everything\r
 install: sourcedoc links\r
-ifdef $(DESTDIR)\r
-# only useful if sql data is in the right place\r
+ifeq ($(shell id -u),0)\r
        chmod g+w $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc\r
-       chgrp www-data $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc\r
+       chown www-data $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc\r
        chkdb -r\r
        chkpriv\r
        chklocale\r
This page took 0.026628 seconds and 4 git commands to generate.