mtd/patches patchin.sh,1.20,1.21

David Woodhouse dwmw2 at infradead.org
Tue Jul 13 04:46:49 EDT 2004


Update of /home/cvs/mtd/patches
In directory phoenix.infradead.org:/tmp/cvs-serv28592/patches

Modified Files:
	patchin.sh 
Log Message:
bitkeeper support

Index: patchin.sh
===================================================================
RCS file: /home/cvs/mtd/patches/patchin.sh,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- patchin.sh	25 May 2004 11:12:41 -0000	1.20
+++ patchin.sh	13 Jul 2004 08:46:47 -0000	1.21
@@ -33,6 +33,7 @@
 
 # Preset variables
 FILESYSTEMS="no"
+BK="no"
 VERSION=0
 PATCHLEVEL=0
 SUBLEVEL=0
@@ -60,12 +61,16 @@
 ZLIB_DIRS="lib/zlib_deflate lib/zlib_inflate"
 ZLIB_FILES="*.[ch] Makefile"
 
+# Make text utils not suck
+export LANG=C
+export LC_ALL=C
 
 # Display usage of this script
 usage () {
 	echo "usage:  $0 [-c] [-j] kernelpath"
 	echo "   -c  -- copy files to kernel tree instead of building links"
 	echo "   -j  -- include jffs2 filesystem" 
+	echo "   -b  -- Check files out for write from BK" 
 	exit 1
 }
 
@@ -75,6 +80,11 @@
 do
 	echo $DIR
 	mkdir -p $DIR
+	if [ "$BK" = "yes" -a -d $DIR/SCCS ]; then
+	    pushd $DIR
+	    bk co -l
+	    popd
+	fi
 	cd $TOPDIR/$DIR
 	FILES=`ls $PATCH_FILES 2>/dev/null`
 	for FILE in $FILES 
@@ -96,11 +106,12 @@
 # Start of script
 
 # Get commandline options
-while getopts cj opt
+while getopts cjb opt
 do
     case "$opt" in
       j)  FILESYSTEMS=yes;;
       c)  LNCP="cp -f"; METHOD="Copy";;
+      b)  BK=yes;;
       \?)
 	  usage;
     esac
@@ -112,6 +123,12 @@
     usage;
 fi
 
+if [ ! -f $LINUXDIR/Makefile -a "$BK" = "yes" ]; then
+    pushd $LINUXDIR
+    bk co Makefile
+    popd
+fi
+
 # Check if kerneldir contains a Makefile
 if [ ! -f $LINUXDIR/Makefile ] 
 then 





More information about the linux-mtd-cvs mailing list