]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
Verify if date is a valid one
authorKacper Kornet <draenog@pld-linux.org>
Wed, 30 Mar 2011 12:19:22 +0000 (13:19 +0100)
committerKacper Kornet <draenog@pld-linux.org>
Wed, 30 Mar 2011 12:22:32 +0000 (13:22 +0100)
If git rev-list --before is called with date it cannot recognize, it
does not exits with error.

builder.sh

index 101028b711fcc080dfb2e7ae2a7b7044954c126c..e406ab787c2b829c88d04a401d01e0b44c54ac56 100755 (executable)
@@ -2079,7 +2079,9 @@ while [ $# -gt 0 ]; do
                -q | --quiet )
                        QUIET="--quiet"; shift ;;
                --date )
-                       CVSDATE="${2}"; shift 2 ;;
+                       CVSDATE="${2}"; shift 2
+                       date -d "$CVSDATE" > /dev/null 2>&1 || { echo >&2 "No valid date specified"; exit 3; }
+                       ;;
                -r | --cvstag )
                        CVSTAG="$2"
                        shift 2
This page took 0.555608 seconds and 4 git commands to generate.