Add version check to get_source.sh
pointo1d
pointo1d at gmail.com
Wed Jun 25 09:51:34 UTC 2014
Hiya Mike ,
On 23/06/14 22:50, Mike Duigou wrote:
> Hello all;
>
> This is the changeset for the enhancement proposed last week. It adds version checks to get_source.sh script. Currently the script will abort if the Mercurial client is not found or is older than 1.5.0. If Mercurial client is older than 2.6.3 then a warning will be issued but the script will attempt to continue.
>
> webrev:http://cr.openjdk.java.net/~mduigou/JDK-8047925/0/webrev/
> jbsbug:https://bugs.openjdk.java.net/browse/JDK-8047925
>
> Mike
Would the following (or similar) not help by way of improving
readability (also incorporating the typo identified by Mikael)...
to_stderr() {
echo "$@" >&2
}
error() {
to_stderr "ERROR: $1"
exit ${2:-126}
}
error "Could not locate Mercurial command"
.
.
.
error"Could not determine Mercurial version"
.
.
.
to_stderr "WARNING: Mercurial version $rqstmajor.$rqstminor.$rqstrev or later is recommended. $hgwhere is version $hgversion"
Best rgds ,
--
Dave Pointon FIAP MBCS
Now I saw, tho' too late, the folly of beginning a work before we count the
cost and before we we judge rightly of our strength to go thro' with it
- Robinson Crusoe
More information about the build-dev
mailing list