From 12c819e204763ddb79c40dddc8361c237a9c6007 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sun, 12 Oct 2008 03:20:37 +0000 Subject: * mingw: Use a better method to find where mingw directory lives. --- winsup/utils/mingw | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'winsup/utils/mingw') diff --git a/winsup/utils/mingw b/winsup/utils/mingw index 7d49bf326..720a25e2c 100755 --- a/winsup/utils/mingw +++ b/winsup/utils/mingw @@ -6,18 +6,12 @@ # Find the path to the compiler. # compiler=$1; shift -case "$compiler" in - */*) ;; - *) compiler=($(type "$compiler")) - compiler=${compiler[2]} ;; -esac +dir=$(cd $(dirname $("$compiler" -print-prog-name=ld))/../..; pwd) # # The mingw32 directory should live somewhere close by to the # compiler. Search for it. # -updir=$(dirname "$compiler") -dir=$(cd "$updir"/..; pwd) [ "$dir" = '/' ] && dir='' mingw_dir='' for d in "$dir"/*-mingw32 "$dir"/usr/*-mingw32 "$dir"/*-mingw* "$dir"/usr/*-mingw*; do -- cgit v1.2.3