Diff for /elwix/config/rc.subr between versions 1.3 and 1.4

version 1.3, 2012/10/12 08:22:43 version 1.4, 2013/01/28 01:47:35
Line 40  SnitVer() Line 40  SnitVer()
 # $3 = To Dest dir  # $3 = To Dest dir
 InstallList()  InstallList()
 {  {
        sed -nE -e 's/^ *([^ #]+) */\1/p' < $1 | tr ':' '\n' |         local TMPFILE=$(mktemp -q /tmp/instlist.XXXXXX)
                tar -C $2 -cvf - -T - | tar -C $3 -x -f -        if [ $? -ne 0 ]; then
                 echo "Error:: Can't create temp file, exiting..."
                 exit 1
         fi
 
         sed -nE -e 's/^ *([^ #]+) */\1/p' < $1 | tr ':' '\n' >$TMPFILE
         cd $2
         for i in $(cat $TMPFILE); do
                 if [ -x $i ]; then
                         echo "Strip '$i'"
                         strip -s $i
                 fi
         done
         cd -
         tar -C $2 -cvf - -T $TMPFILE | tar -C $3 -x -f -
         rm -f $TMPFILE
 }  }
   
 # $1 = From dir  # $1 = From dir
Line 79  CleanCVS() Line 94  CleanCVS()
         find $1 -type f -name .#\* -exec rm -f {} \; >/dev/null 2>&1          find $1 -type f -name .#\* -exec rm -f {} \; >/dev/null 2>&1
 }  }
   
   # $1 = file_pattern
   # $2 = From dir
   StripFiles()
   {
           if [ -d "$2" ]; then
                   local TMPFILE=$(mktemp -q /tmp/instlist.XXXXXX)
                   if [ $? -ne 0 ]; then
                           echo "Error:: Can't create temp file, exiting..."
                           exit 1
                   fi
   
                   cd $2
                   find . -type f -name "$1" >$TMPFILE
                   for i in $(cat $TMPFILE); do
                           if [ -x $i ]; then
                                   echo "Strip '$i'"
                                   strip -s $i
                           fi
                   done
                   cd -
                   rm -f $TMPFILE
           fi
   }

Removed from v.1.3  
changed lines
  Added in v.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>