env.sh: use native Windows paths on Mingw

This commit is contained in:
Ștefan Talpalaru 2019-02-27 03:59:56 +01:00
parent 6188e3f6b8
commit de5a3899f7
No known key found for this signature in database
GPG Key ID: CBF7934204F1B6F9
1 changed files with 5 additions and 1 deletions

6
env.sh
View File

@ -1,7 +1,11 @@
#!/bin/sh
PWD_CMD="pwd"
# get native Windows paths on Mingw
uname | grep -qi mingw && PWD_CMD="pwd -W"
rel_path="$(dirname $0)"
abs_path="$(cd $rel_path; pwd)"
abs_path="$(cd $rel_path; ${PWD_CMD})"
# make it an absolute path, so we can call this script from other dirs
export PATH="${abs_path}/vendor/Nim/bin:$PATH"