resume setup if possible
This commit is contained in:
parent
2f4724d0ad
commit
e72eb4b31f
@ -75,9 +75,12 @@ def install_command(url):
|
|||||||
tmp = tempfile.mkdtemp()
|
tmp = tempfile.mkdtemp()
|
||||||
if call(["/bin/sh", "-c", 'cd %s; curl %s | tar xzv' % (tmp, url)]) == 0:
|
if call(["/bin/sh", "-c", 'cd %s; curl %s | tar xzv' % (tmp, url)]) == 0:
|
||||||
for f in os.listdir(tmp):
|
for f in os.listdir(tmp):
|
||||||
|
dest = os.path.join(seaf_home, os.path.basename(f))
|
||||||
if len(re.findall(version_re, f)) > 0:
|
if len(re.findall(version_re, f)) > 0:
|
||||||
dest = os.path.join(seaf_home, os.path.basename(f))
|
if not os.path.exists(dest):
|
||||||
shutil.move(os.path.join(tmp,f), dest)
|
shutil.move(os.path.join(tmp,f), dest)
|
||||||
|
else:
|
||||||
|
print("Found previous installation, resuming setup")
|
||||||
current = current_version()
|
current = current_version()
|
||||||
target_version = ''.join(re.findall(version_re,dest))
|
target_version = ''.join(re.findall(version_re,dest))
|
||||||
if len(current) == 1: current = current[0]
|
if len(current) == 1: current = current[0]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user