forked from lijiext/lammps
properly apply version flag
This commit is contained in:
parent
718428df68
commit
2604b60eb8
|
@ -55,6 +55,7 @@ if args.build == False and not args.path:
|
|||
|
||||
buildflag = args.build
|
||||
pathflag = args.path != None
|
||||
version = args.version
|
||||
|
||||
homepath = fullpath(".")
|
||||
scafacospath = "%s/scafacos-%s" % (homepath,version)
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
from __future__ import print_function
|
||||
import sys,os,re,glob,subprocess,shutil
|
||||
sys.path.append('..')
|
||||
from install_helpers import fullpath,geturl
|
||||
|
||||
from install_helpers import fullpath,geturl,checkmd5sum
|
||||
from argparse import ArgumentParser
|
||||
|
||||
parser = ArgumentParser(prog='Install.py',
|
||||
|
@ -26,7 +25,6 @@ checksums = { \
|
|||
'3.3.7' : 'f2a417d083fe8ca4b8ed2bc613d20f07' \
|
||||
}
|
||||
|
||||
|
||||
# help message
|
||||
|
||||
help = """
|
||||
|
@ -63,6 +61,7 @@ eigenpath = "%s/eigen3" % homepath
|
|||
|
||||
buildflag = args.build
|
||||
pathflag = args.path != None
|
||||
version = args.version
|
||||
|
||||
if (pathflag):
|
||||
eigenpath = args.path
|
||||
|
@ -77,6 +76,13 @@ if buildflag:
|
|||
url = "http://bitbucket.org/eigen/eigen/get/%s.tar.gz" % version
|
||||
geturl(url,"%s/%s" % (homepath,tarball))
|
||||
|
||||
# verify downloaded archive integrity via md5 checksum, if known.
|
||||
if version in checksums:
|
||||
print("checking version %s\n" % version)
|
||||
if not checkmd5sum(checksums[version],'%s/%s' % (homepath,tarball)):
|
||||
sys.exit("Checksum for Eigen library does not match")
|
||||
|
||||
|
||||
print("Cleaning up old folders ...")
|
||||
edir = glob.glob("%s/eigen-eigen-*" % homepath)
|
||||
edir.append(eigenpath)
|
||||
|
|
Loading…
Reference in New Issue