view tools/fix_lib_links.sh @ 95:91ceb933eeff

ADAPTATION rc.d script example
author ray@terran.dlink.ua
date Tue, 05 Apr 2011 00:41:48 +0300
parents
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