summaryrefslogtreecommitdiffstats
path: root/packaging/windows/win-build-dir.sh
blob: 09dd6b977266e08acfc2a6e3b0ce47b6eb4267b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

if [ -n "${BUILD_DIR}" ]; then
    if (echo "${BUILD_DIR}" | grep -q -E "^[A-Z]:\\\\"); then
        build="$(echo "${BUILD_DIR}" | sed -e 's/\\/\//g' -e 's/^\([A-Z]\):\//\/\1\//' -)"
    else
        build="${BUILD_DIR}"
    fi
elif [ -n "${OSTYPE}" ]; then
    if [ -n "${MSYSTEM}" ]; then
        build="${REPO_ROOT}/build-${OSTYPE}-${MSYSTEM}"
    else
        build="${REPO_ROOT}/build-${OSTYPE}"
    fi
elif [ "$USER" = "vk" ]; then
    build="${REPO_ROOT}/build"
else
    # shellcheck disable=SC2034
    build="${REPO_ROOT}/build"
fi