Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Aug 2007 22:29:46 GMT
From:      "Constantine A. Murenin" <cnst@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 125463 for review
Message-ID:  <200708202229.l7KMTkSl005387@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=125463

Change 125463 by cnst@dale on 2007/08/20 22:28:55

	add some hacks to generate a script to generate a cvs diff
	
	this script is quite nasty, but what else am I to do?

Affected files ...

.. //depot/projects/soc2007/cnst-sensors/sensors.ln.sh#6 edit

Differences ...

==== //depot/projects/soc2007/cnst-sensors/sensors.ln.sh#6 (text+ko) ====

@@ -1,5 +1,5 @@
 #!/bin/sh
-# $P4: //depot/projects/soc2007/cnst-sensors/sensors.ln.sh#5 $
+# $P4: //depot/projects/soc2007/cnst-sensors/sensors.ln.sh#6 $
 # Author: Constantine A. Murenin, 2007-07
 
 # This file creates symbolic links for GSoC2007 cnst_sensors project
@@ -8,8 +8,14 @@
 TPREFIX=${@:-/usr/src}	#target prefix, i.e. /usr/src
 #echo "Source prefix: $SPREFIX;	Target prefix: $TPREFIX"
 
+
+CVSDIFFSH="sensors.cvsdiff.`date +%Y-%m-%dT%H%M%S%z`.sh"
+echo "#!/bin/sh" >$CVSDIFFSH
+
+
 #create some directories that are specific for this project,
 #if they don't exist already
+echo "DIRS=\"\\" >>$CVSDIFFSH
 for i in "sys/dev/lm" "sys/modules/lm" "usr.sbin/sensorsd"
 do
 	DIR2C=$TPREFIX/$i	#directory to create
@@ -18,8 +24,12 @@
 		mkdir $DIR2C && \
 			echo "Created $DIR2C"
 	fi
+	echo " $i\\" >>$CVSDIFFSH
 done
+echo "\"">>$CVSDIFFSH
 
+
+echo "FILES=\"\\" >>$CVSDIFFSH
 for i in `find ./ -name "*.*" -type d`
 do
 	SDIR=`echo $i | sed "s#[.]/##g"`	#source directory
@@ -42,5 +52,32 @@
 		fi
 		ln -sh $SFILE $TFILE || \
 			echo "File $FILEINDIR not copied to $TDIR, error occupied"
+		echo " $TDIR/$FILEINDIR\\" >>$CVSDIFFSH
 	done
 done
+echo "\"">>$CVSDIFFSH
+
+echo "CNST_SENSORS_PREFIX=\`pwd\`">>$CVSDIFFSH
+echo "CVS_SRC_PREFIX=\${@:-/usr/src}">>$CVSDIFFSH
+
+echo "DIFFOUT=\$CNST_SENSORS_PREFIX/cnst-sensors.\`date +%Y-%m-%dT%H%M%S%z\`.patch" >>$CVSDIFFSH
+echo "cd \$CVS_SRC_PREFIX" >>$CVSDIFFSH
+echo "CVSROOT=freebsdanoncvs@anoncvs.FreeBSD.org:/home/ncvs" >>$CVSDIFFSH
+echo "export CVSROOT" >>$CVSDIFFSH
+
+echo >>$CVSDIFFSH
+echo "echo \"cnst-sensors: cvs add (directories)\"" >>$CVSDIFFSH
+echo "for i in \$DIRS ; do echo \$i; cvs add \$i; done " >>$CVSDIFFSH
+echo "#cvs add \$DIRS" >>$CVSDIFFSH
+
+echo >>$CVSDIFFSH
+echo "echo \"cnst-sensors: cvs add\"" >>$CVSDIFFSH
+echo "#for i in \$FILES ; do echo \$i; cvs add \$i; done " >>$CVSDIFFSH
+echo "cvs add \$FILES" >>$CVSDIFFSH
+
+echo >>$CVSDIFFSH
+echo "echo \"cnst-sensors: cvs diff\"" >>$CVSDIFFSH
+echo "#for i in \$FILES ; do echo \$i; cvs diff -udp4N \$i >>\$DIFFOUT; done " >>$CVSDIFFSH
+echo "cvs diff -udp4N \$FILES >\$DIFFOUT; done " >>$CVSDIFFSH
+
+chmod +x $CVSDIFFSH



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708202229.l7KMTkSl005387>