cvs commit: BLFS/BOOK/template newitem

markh at linuxfromscratch.org markh at linuxfromscratch.org
Sat Jun 29 15:09:28 PDT 2002


markh       02/06/29 15:09:28

  Modified:    BOOK/template newitem
  Log:
  update newitem script to handle seperate written and filenames
  
  Revision  Changes    Path
  1.3       +19 -4     BLFS/BOOK/template/newitem
  
  Index: newitem
  ===================================================================
  RCS file: /home/cvsroot/BLFS/BOOK/template/newitem,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- newitem	25 Mar 2002 19:27:18 -0000	1.2
  +++ newitem	29 Jun 2002 22:09:28 -0000	1.3
  @@ -6,17 +6,32 @@
   if [ -z "$1" ]
   then
     echo "Creates template files for a package and fills in the package name."
  -  echo "Usage: $0 <package-name>"
  +  echo "Usage: $0 <written-package-name> <package-filename>"
  +  echo
  +  echo "Note that if you want to create the package Glib, you should"
  +  echo "call the script as: '$0 Glib glib' so that the filenames are in"
  +  echo "lower case.  If you only specify the first option, it is used"
  +  echo "for both the written and filenames."
  +  echo "Note also that *all* filenames in BLFS should be lower-case only"
     exit 1
   fi
  - 
  +
  +WRITTENNAME=$1
  +
  +if [ -z "$2" ]
  +then
  + FILENAME=$WRITTENNAME
  +else
  + FILENAME=$2
  +fi
  +
   pushd `dirname $0`
   TEMPLDIR=`pwd`
   popd
    
   for i in $TEMPLDIR/template*
   do
  -  NEWFILE=`echo $i | sed s@$TEMPLDIR/template@$1@`
  +  NEWFILE=`echo $i | sed s@$TEMPLDIR/template@$FILENAME@`
     echo $NEWFILE
  -  sed s/template/$1/g $i > $NEWFILE
  +  sed s/template/$WRITTENNAME/g $i > $NEWFILE
   done
  
  
  
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe blfs-book' in the subject header of the message



More information about the blfs-book mailing list