123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687(**************************************************************************)(* *)(* Copyright 2012-2015 OCamlPro *)(* Copyright 2012 INRIA *)(* *)(* All rights reserved. This file is distributed under the terms of the *)(* GNU Lesser General Public License version 2.1, with the special *)(* exception on linking described in the file LICENSE. *)(* *)(**************************************************************************)typet=stringletto_stringx=xletof_stringx=xletto_jsonx=`Stringxletcomparevw=OpamVersionCompare.comparevwmoduleO=structtypet=stringletto_string=to_stringletto_json=to_jsonletcompare=compareendmoduleSet=OpamStd.Set.Make(O)moduleMap=OpamStd.Map.Make(O)letcurrent_raw="2.0.2"letcurrent=of_stringcurrent_rawletmajorv=tryleti=String.indexv'.'inof_string(String.subv0i)withNot_found->vletnopatchv=tryleti=String.indexv'.'inleti=String.index_fromv(i+1)'.'in(String.subv0i)withNot_found->letrecfi=ifi>=String.lengthvthenvelsematchString.getviwith|'0'..'9'|'.'->f(i+1)|_->String.subv0iinf0letcurrent_nopatch=nopatchcurrent_rawletmessage()=OpamConsole.msg"\n\
%s version %s\n\
\n\
Copyright (C) 2012 OCamlPro - INRIA, 2013-2015 OCamlPro\n\
\n\
This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"Sys.argv.(0)current_raw;exit0letgitversion=refNoneletset_gits=gitversion:=Somesletgit()=match!gitversionwith|None->None|Somev->Some(of_stringv)letfull()=letgit_version=matchgit()with|None->""|Somev->Printf.sprintf" (%s)"(to_stringv)inPrintf.sprintf"%s%s"(to_stringcurrent)git_versionletmagic()=lethash=Hashtbl.hash(full())inString.sub(Printf.sprintf"%08X"hash)08