annotate tools/fix_lib_links.sh @ 421:c685b3c5f40b

Update MPD's Makefile.
author Aleksandr Rybalko <ray@ddteam.net>
date Fri, 14 Sep 2012 02:20:50 +0300
parents 91ceb933eeff
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
95
91ceb933eeff ADAPTATION rc.d script example
ray@terran.dlink.ua
parents:
diff changeset
1 #!/bin/sh
91ceb933eeff ADAPTATION rc.d script example
ray@terran.dlink.ua
parents:
diff changeset
2
91ceb933eeff ADAPTATION rc.d script example
ray@terran.dlink.ua
parents:
diff changeset
3
91ceb933eeff ADAPTATION rc.d script example
ray@terran.dlink.ua
parents:
diff changeset
4
91ceb933eeff ADAPTATION rc.d script example
ray@terran.dlink.ua
parents:
diff changeset
5 for link in `find . -type l` ; do
91ceb933eeff ADAPTATION rc.d script example
ray@terran.dlink.ua
parents:
diff changeset
6 lk=`readlink $link`;
91ceb933eeff ADAPTATION rc.d script example
ray@terran.dlink.ua
parents:
diff changeset
7 TEST=`echo $lk | sed -E "s/^(.).*/\\1/"` ;
91ceb933eeff ADAPTATION rc.d script example
ray@terran.dlink.ua
parents:
diff changeset
8 if [ "x${TEST}" = "x/" ] ; then
91ceb933eeff ADAPTATION rc.d script example
ray@terran.dlink.ua
parents:
diff changeset
9 new=`echo $lk | sed "s/^\//\.\.\/\.\.\//"`;
91ceb933eeff ADAPTATION rc.d script example
ray@terran.dlink.ua
parents:
diff changeset
10 echo ln -sf $new $link ;
91ceb933eeff ADAPTATION rc.d script example
ray@terran.dlink.ua
parents:
diff changeset
11 ln -sf $new $link ;
91ceb933eeff ADAPTATION rc.d script example
ray@terran.dlink.ua
parents:
diff changeset
12 fi
91ceb933eeff ADAPTATION rc.d script example
ray@terran.dlink.ua
parents:
diff changeset
13 done