[csw-devel] SF.net SVN: gar:[15045] csw/mgar/pkg/cswclassutils/trunk/files/ CSWcswclassutils.i.cswetcshells

bdwalton at users.sourceforge.net bdwalton at users.sourceforge.net
Tue Jul 12 02:08:48 CEST 2011


Revision: 15045
          http://gar.svn.sourceforge.net/gar/?rev=15045&view=rev
Author:   bdwalton
Date:     2011-07-12 00:08:47 +0000 (Tue, 12 Jul 2011)

Log Message:
-----------
cswclassutils/trunk: modify cas_etcshells to have nicer output during use

Modified Paths:
--------------
    csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswetcshells

Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswetcshells
===================================================================
--- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswetcshells	2011-07-11 15:56:00 UTC (rev 15044)
+++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswetcshells	2011-07-12 00:08:47 UTC (rev 15045)
@@ -8,19 +8,16 @@
 
 echo "Installing class <cswetcshells> ..."
 
-PIR=${PKG_INSTALL_ROOT:-/}
+shellfile=/etc/shells
 
-shellfile=$PIR/etc/shells
-
 while read src dest; do
-  echo $dest
   /usr/bin/cp $src $dest || exit 2
 
   shell=$dest
 
-  if [ ! -f "$shellfile" ]; then
+  if [ ! -f "${PKG_INSTALL_ROOT}$shellfile" ]; then
       echo "Creating /etc/shells with default set of shells (see: man shells)"
-      cat <<EOF >$shellfile
+      cat <<EOF >${PKG_INSTALL_ROOT}$shellfile
 /bin/bash
 /bin/csh
 /bin/jsh
@@ -46,11 +43,11 @@
 EOF
 	fi
 
-  exists=`awk "\\\$1 == \"$shell\" { print \"found\" }" $shellfile`
+  exists=`awk "\\\$1 == \"$shell\" { print \"found\" }" ${PKG_INSTALL_ROOT}$shellfile`
 
   if [ "$exists" != "found" ]; then
       echo "Registering $shell in $shellfile."
-      echo "$shell	# $PKGINST" >> $shellfile
+      echo "$shell	# $PKGINST" >> ${PKG_INSTALL_ROOT}$shellfile
   else
       echo "Not registering $shell in $shellfile.  It is already registered."
   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