docs-common/bin insert-changelog,1.2,1.3

Paul W. Frields (pfrields) fedora-docs-commits at redhat.com
Sun Jan 15 22:57:47 UTC 2006


Author: pfrields

Update of /cvs/docs/docs-common/bin
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26432/docs-common/bin

Modified Files:
	insert-changelog 
Log Message:
Better handling of brand-new rpm-info.xml files


Index: insert-changelog
===================================================================
RCS file: /cvs/docs/docs-common/bin/insert-changelog,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- insert-changelog	15 Jan 2006 22:32:57 -0000	1.2
+++ insert-changelog	15 Jan 2006 22:57:40 -0000	1.3
@@ -22,16 +22,24 @@
 
 if test $ROLE = "rpm"; then
     REVDATE=`date +"%a %b %d %Y"`
+    ZEROREV=0
+    REVDESC="an integer release number"
 elif test $ROLE = "doc"; then
     REVDATE=`date +"%Y-%M-%d"`
+    ZEROREV=0.0                  # unlikely, but you never know
+    REVDESC="a decimal version number"
 else
     echo "This should never happen; aborting"
     exit 1
 fi
 
 LASTREV=$(get_latest_revision "$ROLE")
+if [ -z "$LASTREV" ]; then # this is the first revision for this role
+    LASTREV=$ZEROREV
+fi
+
 while test -z "$NUMBER"; do
-    echo -n "Enter revision number greater than $LASTREV: "
+    echo -n "Enter $REVDESC greater than $LASTREV: "
     read NUMBER
     # Yes, it's perfectly safe to assume Python is present
     if test `python -c "from distutils import version; a=version.LooseVersion('$LASTREV') ; b=version.LooseVersion('$NUMBER'); print b>a"` = "False"; then




More information about the Fedora-docs-commits mailing list