From 489623ef3069b479788f91a6935b8061b9aab2ce Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 25 Aug 2013 19:47:09 -0300 Subject: Fixing user and group if needed --- lib/httracker/functions | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/httracker/functions b/lib/httracker/functions index e224c2d..0d3293a 100644 --- a/lib/httracker/functions +++ b/lib/httracker/functions @@ -9,7 +9,6 @@ function httracker_get { local target="$MIRRORS/$hash" mkdir -p $target - #chown -R $USER.$GROUP $target/ # We already got this one if [ -f "$target/ok" ]; then @@ -36,6 +35,10 @@ function httracker_get { echo "Error fetching $url." rm -rf $target fi + + if [ "`whoami`" != "$USER" ] && [ "`whoami`" == "root" ]; then + chown -R $USER.$GROUP $target/ + fi } function httracker_get_single { -- cgit v1.2.3