view tools/fix_lib_links.sh @ 487:5616a3d38d8e

[mq]: cross-ports
author Aleksandr Rybalko <ray@ddteam.net>
date Fri, 02 Nov 2012 15:36:00 +0200
parents 91ceb933eeff
children
line wrap: on
line source
#!/bin/sh



for link in `find . -type l` ; do 
	lk=`readlink $link`; 
	TEST=`echo $lk | sed -E "s/^(.).*/\\1/"` ;
	if [ "x${TEST}" = "x/" ] ; then
		new=`echo $lk | sed "s/^\//\.\.\/\.\.\//"`; 
		echo ln -sf $new $link ;
		ln -sf $new $link ;
	fi
done