From e38ac00f3ca8b68c0c1760b989c3f622ecbff967 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Sun, 27 Aug 2017 17:59:49 -0700 Subject: [PATCH] caches: Move cache cleaning helper tools under scripts/lib. This helps keep the root of scripts/ uncluttered. --- scripts/clean-unused-caches | 6 +++--- scripts/{ => lib}/clean-emoji-cache | 2 +- scripts/{ => lib}/clean-npm-cache | 2 +- scripts/{ => lib}/clean-venv-cache | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) rename scripts/{ => lib}/clean-emoji-cache (95%) rename scripts/{ => lib}/clean-npm-cache (96%) rename scripts/{ => lib}/clean-venv-cache (95%) diff --git a/scripts/clean-unused-caches b/scripts/clean-unused-caches index 788b5e5444..2b87d0077d 100755 --- a/scripts/clean-unused-caches +++ b/scripts/clean-unused-caches @@ -21,9 +21,9 @@ def main(): parse_args() os.chdir(ZULIP_PATH) print("Starting cache cleaning scripts...") - subprocess.check_call(["./scripts/clean-venv-cache"] + sys.argv[1:]) - subprocess.check_call(["./scripts/clean-npm-cache"] + sys.argv[1:]) - subprocess.check_call(["./scripts/clean-emoji-cache"] + sys.argv[1:]) + subprocess.check_call(["./scripts/lib/clean-venv-cache"] + sys.argv[1:]) + subprocess.check_call(["./scripts/lib/clean-npm-cache"] + sys.argv[1:]) + subprocess.check_call(["./scripts/lib/clean-emoji-cache"] + sys.argv[1:]) if __name__ == "__main__": main() diff --git a/scripts/clean-emoji-cache b/scripts/lib/clean-emoji-cache similarity index 95% rename from scripts/clean-emoji-cache rename to scripts/lib/clean-emoji-cache index 4b699fbf6c..52026ef842 100755 --- a/scripts/clean-emoji-cache +++ b/scripts/lib/clean-emoji-cache @@ -6,7 +6,7 @@ import sys if False: from typing import Set, Text -ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.append(ZULIP_PATH) from scripts.lib.zulip_tools import GENERIC_CACHE_SCRIPT_PARSER, \ generate_sha1sum_emoji, get_caches_to_be_purged, get_environment, \ diff --git a/scripts/clean-npm-cache b/scripts/lib/clean-npm-cache similarity index 96% rename from scripts/clean-npm-cache rename to scripts/lib/clean-npm-cache index 5e22f90c6e..5beb468355 100755 --- a/scripts/clean-npm-cache +++ b/scripts/lib/clean-npm-cache @@ -7,7 +7,7 @@ import sys if False: from typing import Set, Text -ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.append(ZULIP_PATH) from scripts.lib.node_cache import generate_sha1sum_node_modules from scripts.lib.zulip_tools import GENERIC_CACHE_SCRIPT_PARSER, \ diff --git a/scripts/clean-venv-cache b/scripts/lib/clean-venv-cache similarity index 95% rename from scripts/clean-venv-cache rename to scripts/lib/clean-venv-cache index 23a392041d..98ad9fcaff 100755 --- a/scripts/clean-venv-cache +++ b/scripts/lib/clean-venv-cache @@ -6,7 +6,7 @@ import sys if False: from typing import Set, Text -ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.append(ZULIP_PATH) from scripts.lib.hash_reqs import expand_reqs, hash_deps from scripts.lib.zulip_tools import GENERIC_CACHE_SCRIPT_PARSER, \