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 "