From d5cf060a484c018b077619654659b631ba1b061f Mon Sep 17 00:00:00 2001 From: "Lucas C. Villa Real" Date: Fri, 30 Dec 2016 23:35:21 -0200 Subject: Prevent the creation of recursive symlinks. --- bin/InstallPackage-RPM | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bin/InstallPackage-RPM') diff --git a/bin/InstallPackage-RPM b/bin/InstallPackage-RPM index 3da39c6..5488ebc 100755 --- a/bin/InstallPackage-RPM +++ b/bin/InstallPackage-RPM @@ -99,7 +99,10 @@ function flatten_rpm() { fi for optfile in $(basename --multiple ./opt/$vendordir/$pkgdir/*) do - ln ${verbose} -fs $target/$optfile "${unmanagedopt}/$vendordir/$pkgdir/$optfile" + if [ ! -e "${unmanagedopt}/$vendordir/$pkgdir/$optfile" ] + then + ln ${verbose} -fs $target/$optfile "${unmanagedopt}/$vendordir/$pkgdir/$optfile" + fi done done } -- cgit v1.1