aboutsummaryrefslogtreecommitdiff
path: root/lib/httracker/functions
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-08-25 20:35:10 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-08-25 20:35:10 -0300
commite10bb84f6e3a5aa3d73c2b3a141ad7b99fe86762 (patch)
tree2bc8ac6f0f2ce7dc1bd43d7cfbd0fd936c62826f /lib/httracker/functions
parent9b31f277031e58b6125018161cb9764d445a61b7 (diff)
downloadhttruta-e10bb84f6e3a5aa3d73c2b3a141ad7b99fe86762.tar.gz
httruta-e10bb84f6e3a5aa3d73c2b3a141ad7b99fe86762.tar.bz2
Fix permissions before fetching links
Diffstat (limited to 'lib/httracker/functions')
-rw-r--r--lib/httracker/functions8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/httracker/functions b/lib/httracker/functions
index ba68e50..40a9290 100644
--- a/lib/httracker/functions
+++ b/lib/httracker/functions
@@ -21,6 +21,10 @@ function httracker_get {
OPTS=""
fi
+ if [ "`whoami`" != "$USER" ] && [ "`whoami`" == "root" ]; then
+ chown -R $USER.$GROUP $target/
+ fi
+
# Get each URL
httrack \
--mirror \
@@ -42,10 +46,6 @@ 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_incremental {