unpack-zulip: Update for zulip-server paths containing versions.

(imported from commit 9318cab0cfcdf57412afbe9386371c8f9994da9f)
This commit is contained in:
Tim Abbott 2013-11-13 22:51:46 -05:00
parent 7e64e19cc2
commit bd607a32e6
1 changed files with 2 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import sys
import subprocess import subprocess
import datetime import datetime
import tempfile import tempfile
import glob
sys.path.append(os.path.join(os.path.dirname(__file__), '..')) sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from zulip_tools import DEPLOYMENTS_DIR, FAIL, ENDC, make_deploy_path from zulip_tools import DEPLOYMENTS_DIR, FAIL, ENDC, make_deploy_path
@ -18,7 +19,7 @@ deploy_path = make_deploy_path()
extract_path = tempfile.mkdtemp() extract_path = tempfile.mkdtemp()
subprocess.check_call(["tar", "-xf", tarball_path, "-C", extract_path]) subprocess.check_call(["tar", "-xf", tarball_path, "-C", extract_path])
subprocess.check_call(["mv", os.path.join(extract_path, "zulip-server"), deploy_path]) subprocess.check_call(["mv", glob.glob(os.path.join(extract_path, "zulip-server-*"))[0], deploy_path])
subprocess.check_call(["rmdir", extract_path]) subprocess.check_call(["rmdir", extract_path])
subprocess.check_call(["ln", "-nsf", "/etc/zulip/settings.py", subprocess.check_call(["ln", "-nsf", "/etc/zulip/settings.py",
os.path.join(deploy_path, "zproject/local_settings.py")]) os.path.join(deploy_path, "zproject/local_settings.py")])