From 7d1bb8162ad2e286f955ee504531357166282b04 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Fri, 12 Dec 2008 20:40:24 -0300 Subject: [PATCH] sde-reown: fixed to handle better the case where download/ doesn't exist --- bin/sde-reown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/sde-reown b/bin/sde-reown index fb79384..a52b38b 100755 --- a/bin/sde-reown +++ b/bin/sde-reown @@ -21,13 +21,13 @@ cd "$SDEROOT" UG=$( stat -c %U:%G . ) -UGD=$( stat -c %U:%G download/ ) +UGD=$( [ -d download/ ] && stat -c %U:%G download/ ) export LANG=C ( # accept luser downloads but staying hard-link friendly -chown -v $UGD $( find download/ -type d 2> /dev/null ) -chown -Rv $UG $( ls -1d * .git 2> /dev/null | +find download/ -type d -exec chown -v "$UGD" '{}' \; 2> /dev/null +chown -Rv "$UG" $( ls -1d * .git 2> /dev/null | grep -v -e '^src.' -e '^build$' -e '^download$' ) ) | grep -v "' retained "