needed when building *only* myplc-native
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 3 Jul 2008 21:30:46 +0000 (21:30 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 3 Jul 2008 21:30:46 +0000 (21:30 +0000)
myplc-native.spec

index babf0bb..15da9b1 100644 (file)
@@ -107,7 +107,7 @@ if [ -n "$SUDO_USER" ] ; then
     # /usr/bin/sudo get created with non-readable permissions.
     find . -not -perm +0600 -exec chmod u+rw {} \;
     # Allow user to delete the built RPM(s)
-    chown -h -R $SUDO_USER %{_rpmdir}/%{_arch}
+    [ -d %{_rpmdir}/%{_arch} ] && chown -h -R $SUDO_USER %{_rpmdir}/%{_arch}
 fi
 
 %pre