[csw-devel] SF.net SVN: gar:[6594] csw/mgar/pkg/unixodbc/trunk/files/CSWunixodbc. postinstall-moving

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Mon Sep 28 13:09:20 CEST 2009


Revision: 6594
          http://gar.svn.sourceforge.net/gar/?rev=6594&view=rev
Author:   wahwah
Date:     2009-09-28 11:09:20 +0000 (Mon, 28 Sep 2009)

Log Message:
-----------
CSWunixodbc.postinstall-moving: Adding the use of PKG_INSTALL_ROOT.

Modified Paths:
--------------
    csw/mgar/pkg/unixodbc/trunk/files/CSWunixodbc.postinstall-moving

Modified: csw/mgar/pkg/unixodbc/trunk/files/CSWunixodbc.postinstall-moving
===================================================================
--- csw/mgar/pkg/unixodbc/trunk/files/CSWunixodbc.postinstall-moving	2009-09-27 22:55:14 UTC (rev 6593)
+++ csw/mgar/pkg/unixodbc/trunk/files/CSWunixodbc.postinstall-moving	2009-09-28 11:09:20 UTC (rev 6594)
@@ -35,7 +35,7 @@
 # a special setting can be used:
 #
 # DEST_DIR_odbc_ini="/etc/opt/csw/foo/odbc.ini"
-# 
+#
 # The same applies to DEST_DIR and ARCH_DIR.
 
 set -u
@@ -55,6 +55,8 @@
 DEST_DIR___default__="/etc/opt/csw"
 readonly DEST_DIR___default__
 
+PKG_INSTALL_ROOT=${PKG_INSTALL_ROOT:-/}
+
 return_code=0
 
 migration_info="
@@ -105,8 +107,8 @@
 }
 
 place_signpost_for() {
-	__file_name="$1"
-	echo "${migration_info}" > "${__file_name}.${deprecated_file_ext}"
+  __file_name="$1"
+  echo "${migration_info}" > "${__file_name}.${deprecated_file_ext}"
 }
 
 main() {
@@ -126,9 +128,9 @@
     per_file_archdir=`expand_modifiers ARCH_DIR ${modifier_value}`
     default_archdir=`expand_modifiers ARCH_DIR __default__`
     archdir="${per_file_archdir:-${default_archdir}}"
-    srcpath="${srcdir}/${file_name}"
-    dstpath="${dstdir}/${file_name}"
-    archpath="${archdir}/${file_name}"
+    srcpath="${PKG_INSTALL_ROOT}/${srcdir}/${file_name}"
+    dstpath="${PKG_INSTALL_ROOT}/${dstdir}/${file_name}"
+    archpath="${PKG_INSTALL_ROOT}/${archdir}/${file_name}"
 
     # Make sure we have the environment we expect
     if [ ! -d "${archdir}" ]


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