chore: support easy override for ~/git

This commit is contained in:
Marcus Holland-Moritz 2024-01-24 08:07:33 +01:00
parent 23b868aab7
commit bb15d4ce8a
2 changed files with 10 additions and 4 deletions

View File

@ -541,7 +541,8 @@ $ brew install ronn
- Clone the [vcpkg](https://vcpkg.io/),
[lipo-dir-merge](https://github.com/faaxm/lipo-dir-merge) and
DwarFS repositories:
DwarFS repositories. If you want the files to go to a different
location, you'll need set `VCPKG_BASEDIR` later.
```
$ cd ~
@ -565,6 +566,7 @@ $ cd dwarfs
$ git checkout experimental/osx-build
$ mkdir build
$ cd build
$ export VCPKG_BASEDIR=$HOME/git # optional
$ sh ../cmake/osx.sh rebuild-vcpkg
$ sh ../cmake/osx.sh
$ ninja

View File

@ -2,16 +2,20 @@
set -e
if [[ -z "${VCPKG_BASEDIR}" ]]; then
VCPKG_BASEDIR=$HOME/git
fi
if [[ -z "${VCPKG_ROOT}" ]]; then
VCPKG_ROOT=$HOME/git/vcpkg
VCPKG_ROOT=$VCPKG_BASEDIR/vcpkg
fi
if [[ -z "${VCPKG_INSTALL_ROOT}" ]]; then
VCPKG_INSTALL_ROOT=$HOME/git/@vcpkg-install
VCPKG_INSTALL_ROOT=$VCPKG_BASEDIR/@vcpkg-install
fi
if [[ -z "${LIPO_DIR_MERGE}" ]]; then
LIPO_DIR_MERGE=$HOME/git/lipo-dir-merge/lipo-dir-merge.py
LIPO_DIR_MERGE=$VCPKG_BASEDIR/lipo-dir-merge/lipo-dir-merge.py
fi
build_mode=$1