From 9ee320227320690c738231ea0ade4a01ab9bc1e3 Mon Sep 17 00:00:00 2001 From: Deepak Majeti Date: Fri, 13 Sep 2024 16:02:59 -0400 Subject: [PATCH] address review comments --- README.md | 10 ++++++---- scripts/setup-macos.sh | 14 ++++++++------ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index fe91dae256fcf..20d55392a2f99 100644 --- a/README.md +++ b/README.md @@ -87,17 +87,19 @@ dependencies for a given platform. The following setup scripts use the `DEPENDENCY_DIR` environment variable to set the location to download and build packages. This defaults to `deps-download` in the current working directory. + Use `INSTALL_PREFIX` to set the install directory of the packages. This defaults to `deps-install` in the current working directory on macOS and to the default install location (eg. `/usr/local`) on linux. Using the default install location `/usr/local` on macOS is discouraged since this location is used by certain Homebrew versions. -You will have to manually add the `INSTALL_PREFIX` value in the IDE or bash environment, +Manually add the `INSTALL_PREFIX` value in the IDE or bash environment, say `export INSTALL_PREFIX=/Users/$USERNAME/velox/deps-install` to `~/.zshrc` so that -Velox builds can use the installed packages. -You can also reuse this install for Velox clients such as Prestissimo by specifying a -common location. +subsequent Velox builds can use the installed packages. + +*You can reuse `DEPENDENCY_INSTALL` and `INSTALL_PREFIX` for Velox clients such as Prestissimo +by specifying a common shared directory.`* ### Setting up on macOS diff --git a/scripts/setup-macos.sh b/scripts/setup-macos.sh index 855ce3e9ccf58..8d8863586df73 100755 --- a/scripts/setup-macos.sh +++ b/scripts/setup-macos.sh @@ -81,10 +81,12 @@ function install_build_prerequisites { python3 -m venv ${PYTHON_VENV} fi source ${PYTHON_VENV}/bin/activate; pip3 install cmake-format regex pyyaml - curl -L https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-darwin.tar.gz > ccache.tar.gz - tar -xf ccache.tar.gz - mv ccache-4.10.2-darwin/ccache /usr/local/bin/ - rm -rf ccache-4.10.2-darwin ccache.tar.gz + if [ ! -f /usr/local/bin/ccache ]; then + curl -L https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-darwin.tar.gz > ccache.tar.gz + tar -xf ccache.tar.gz + mv ccache-4.10.2-darwin/ccache /usr/local/bin/ + rm -rf ccache-4.10.2-darwin ccache.tar.gz + fi } function install_velox_deps_from_brew { @@ -173,5 +175,5 @@ function install_velox_deps { fi ) -echo 'To add cmake-format bin to your $PATH, consider adding this to your ~/.profile:' -echo 'Please add $INSTALL_PREFIX to your ~/.zshrc' +echo "To reuse the installed dependencies for subsequent builds, consider adding this to your ~/.zshrc" +echo "export INSTALL_PREFIX=$INSTALL_PREFIX"