diff options
| author | Billy O'Neal <billy.oneal@gmail.com> | 2018-12-11 11:48:41 -0800 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2018-12-11 11:48:41 -0800 |
| commit | cf7e2f3906f78dcb89f320a642428b54c00e4e0b (patch) | |
| tree | 97fa82d41cc2e6580bf7c00be63d3e649d7ef514 /scripts | |
| parent | 9b8cc8095323a550ecd7a184881bd5802b5a313f (diff) | |
| download | vcpkg-cf7e2f3906f78dcb89f320a642428b54c00e4e0b.tar.gz vcpkg-cf7e2f3906f78dcb89f320a642428b54c00e4e0b.zip | |
Allow redirection of the downloads folder with an environment variable. (#4883)
* Add detection for VCPKG_DOWNLOADS environment variable in vcpkgpaths.cpp.
* Pass the downloads directory from VcpkgPaths to cmake.
* Also fixup bootstrap on *nix.
* Make error message a little prettier.
* Make that bash script actually work :)
* [vcpkg] Alter Optional<> usage style
* [vcpkg-docs] Add section on Environment Variables to the docs
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/bootstrap.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index a8b3d102b..5de0998c1 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -17,7 +17,16 @@ while [ "$vcpkgRootDir" != "/" ] && ! [ -e "$vcpkgRootDir/.vcpkg-root" ]; do vcpkgRootDir="$(dirname "$vcpkgRootDir")" done -downloadsDir="$vcpkgRootDir/downloads" +if [ -z ${VCPKG_DOWNLOADS+x} ]; then + downloadsDir="$vcpkgRootDir/downloads" +else + downloadsDir="$VCPKG_DOWNLOADS" + if [ ! -d "$VCPKG_DOWNLOADS" ]; then + echo "VCPKG_DOWNLOADS was set to '$VCPKG_DOWNLOADS', but that was not a directory." + exit 1 + fi + +fi extractStringBetweenDelimiters() { |
