#!/bin/sh# Find all symlink in toolchains/windows and windows-x86_64 directoriesWIN_DIRS=`find toolchains \(-name"windows"-o-name"windows-x86_64"\)`for WIN_DIR in$WIN_DIRS;do while[ 1 ]do# Find all symlinks in this directory.SYMLINKS=`find $WIN_DIR-type l`if[-z"$SYMLINKS"];thenbreak;fi# Iterate symlinksfor SYMLINK in$SYMLINKS;do if[-L"$SYMLINK"];thenDIR=`dirname"$SYMLINK"`FILE=`basename"$SYMLINK"`# Note that if `readlink $FILE` is also a link, we want to deal# with it in the next iteration. There is potential infinite-loop# situation for cicular link doesn't exist in our case, though.(cd"$DIR"&&\LINK=`readlink"$FILE"`&&\test!-L"$LINK"&&\rm-f"$FILE"&&\cp-a"$LINK""$FILE")fi done donedone# The following should print nothing if we did good jobfind toolchains/ -type l | grep windows