summaryrefslogtreecommitdiffstats
path: root/packaging/windows/win-build-dir.sh
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/windows/win-build-dir.sh')
-rw-r--r--packaging/windows/win-build-dir.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/packaging/windows/win-build-dir.sh b/packaging/windows/win-build-dir.sh
new file mode 100644
index 000000000..09dd6b977
--- /dev/null
+++ b/packaging/windows/win-build-dir.sh
@@ -0,0 +1,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