Merge branch 'bugfix/export_macos' into 'master'

tools: export.sh: fix ESP-IDF path detection on macos

See merge request espressif/esp-idf!5644
This commit is contained in:
Ivan Grokhotkov
2019-07-29 19:01:50 +08:00

View File

@@ -2,9 +2,10 @@
function realpath_int() { function realpath_int() {
wdir="$PWD"; [ "$PWD" = "/" ] && wdir="" wdir="$PWD"; [ "$PWD" = "/" ] && wdir=""
case "$0" in arg=$1
/*) scriptdir="${0}";; case "$arg" in
*) scriptdir="$wdir/${0#./}";; /*) scriptdir="${arg}";;
*) scriptdir="$wdir/${arg#./}";;
esac esac
scriptdir="${scriptdir%/*}" scriptdir="${scriptdir%/*}"
echo "$scriptdir" echo "$scriptdir"