provision: Compute ZULIP_PATH dynamically.

This commit is contained in:
Tim Abbott
2016-04-06 10:09:16 -07:00
parent 0058ccbdb0
commit fc4e8730f3

View File

@@ -46,18 +46,14 @@ APT_DEPENDENCIES = {
}
VENV_PATH = "/srv/zulip-venv"
ZULIP_PATH = "/srv/zulip"
ZULIP_PATH = os.path.dirname(os.path.abspath(__file__))
if not os.path.exists(os.path.join(os.path.dirname(__file__), ".git")):
print("Error: No Zulip git repository present at /srv/zulip!")
if not os.path.exists(os.path.join(ZULIP_PATH, ".git")):
print("Error: No Zulip git repository present!")
print("To setup the Zulip development environment, you should clone the code")
print("from GitHub, rather than using a Zulip production release tarball.")
sys.exit(1)
# TODO: Parse arguments properly
if "--travis" in sys.argv or "--docker" in sys.argv:
ZULIP_PATH = "."
# tsearch-extras is an extension to postgres's built-in full-text search.
# TODO: use a real APT repository
TSEARCH_URL_PATTERN = "https://github.com/zulip/zulip-dist-tsearch-extras/raw/master/{}_{}_{}.deb?raw=1"