summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorPaul W. Frields <stickster@gmail.com>2006-01-15 22:57:40 +0000
committerPaul W. Frields <stickster@gmail.com>2006-01-15 22:57:40 +0000
commit4a9a81bb6e2e33fc48f72ebc17056a1a120f70ed (patch)
tree55cd1d437b99a68a960972009a86c7fbce7d0d44 /bin
parentc937429bf55c5778808f014653a3bfc6b75c2e1f (diff)
downloadfedora-doc-utils-4a9a81bb6e2e33fc48f72ebc17056a1a120f70ed.tar.gz
fedora-doc-utils-4a9a81bb6e2e33fc48f72ebc17056a1a120f70ed.tar.xz
fedora-doc-utils-4a9a81bb6e2e33fc48f72ebc17056a1a120f70ed.zip
Better handling of brand-new rpm-info.xml files
Diffstat (limited to 'bin')
-rwxr-xr-xbin/insert-changelog10
1 files changed, 9 insertions, 1 deletions
diff --git a/bin/insert-changelog b/bin/insert-changelog
index 8a96b45..33045b1 100755
--- a/bin/insert-changelog
+++ b/bin/insert-changelog
@@ -22,16 +22,24 @@ echo $ROLE
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