Merged Thierry's symlink fix
authorChristoph Dwertmann <christoph.dwertmann@nicta.com.au>
Fri, 7 Jun 2013 08:09:17 +0000 (18:09 +1000)
committerChristoph Dwertmann <christoph.dwertmann@nicta.com.au>
Fri, 7 Jun 2013 08:09:17 +0000 (18:09 +1000)
rpm/rvm-ruby.spec

index 43f2f59..244012f 100644 (file)
@@ -147,7 +147,7 @@ find $br -type f -print0 | xargs -0 sed -i "s,$br,$slashes,g"
 
 # Fix symlinks with bad path
 for f in $(find $br -type l |grep "$br"); do
-    ln -sfn $(readlink -f $f |sed "s,$br,,") $f
+    ln -sfn $(echo $f | sed "s,^$br,,") $f
 done
 
 find $br -maxdepth 1 -name '.*' -exec rm -rf {} \;