[csw-devel] SF.net SVN: gar:[6325] csw/mgar/pkg/git/trunk

bdwalton at users.sourceforge.net bdwalton at users.sourceforge.net
Thu Sep 17 01:58:42 CEST 2009


Revision: 6325
          http://gar.svn.sourceforge.net/gar/?rev=6325&view=rev
Author:   bdwalton
Date:     2009-09-16 23:58:42 +0000 (Wed, 16 Sep 2009)

Log Message:
-----------
git: add a postinstall script to migrate config to /etc/opt/csw

Modified Paths:
--------------
    csw/mgar/pkg/git/trunk/Makefile

Added Paths:
-----------
    csw/mgar/pkg/git/trunk/files/CSWgit.postinstall

Modified: csw/mgar/pkg/git/trunk/Makefile
===================================================================
--- csw/mgar/pkg/git/trunk/Makefile	2009-09-16 23:51:40 UTC (rev 6324)
+++ csw/mgar/pkg/git/trunk/Makefile	2009-09-16 23:58:42 UTC (rev 6325)
@@ -86,6 +86,8 @@
 GIT_REPOS  = git://git.kernel.org/pub/scm/git/git.git
 GIT_TREEISH_git.git = v$(GARVERSION)$(if $(PATCHLEVEL),-$(PATCHLEVEL))
 
+DISTFILES = CSWgit.postinstall
+
 fdirs = $(bindir_install) $(mandir) $(libexecdir_install)
 define _git_files
 $(foreach d,$(fdirs),$(d)/.*$(1).*) $(sharedstatedir)/$(1).*

Added: csw/mgar/pkg/git/trunk/files/CSWgit.postinstall
===================================================================
--- csw/mgar/pkg/git/trunk/files/CSWgit.postinstall	                        (rev 0)
+++ csw/mgar/pkg/git/trunk/files/CSWgit.postinstall	2009-09-16 23:58:42 UTC (rev 6325)
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+GC_OLD="$PKG_INSTALL_ROOT/opt/csw/etc/gitconfig"
+GC_NEW="$PKG_INSTALL_ROOT/etc/opt/csw/gitconfig"
+
+# this will hopefully ease the /opt/csw/etc -> /etc/opt/csw
+# transition.
+if [ -f "$GC_OLD" -a ! -f "$GC_NEW" ]; then
+   echo "Copying /opt/csw/etc/gitconfig to /etc/opt/csw/gitconfig"
+   cp -p "$GC_OLD" "$GC_NEW"
+fi


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list