From c1c334d516e9da5642c61c7e540bd68d0a278531 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Thu, 30 Jul 2020 01:05:12 +0200 Subject: Try --- src/update/gitjoe.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/update/gitjoe.pl b/src/update/gitjoe.pl index 6ae1930..f775535 100755 --- a/src/update/gitjoe.pl +++ b/src/update/gitjoe.pl @@ -6,7 +6,7 @@ use Term::ANSIColor; use File::Copy; use Capture::Tiny; use constant { - TMP_DIR => '/tmp/gitjoe', + TMP_DIR => '/tmp/gitjoe/', SITE_DIR => '/usr/local/www/gitjoe/' }; @@ -94,7 +94,13 @@ sub main { my @repos = get_repos_index($users[$i]); stagit_generate($users[$i], @repos); print "Removing user " . colored($users[$i], 'bold green') . " old directory from " . colored(SITE_DIR, 'bold') . ".\n"; + system( + '/bin/rm', + '-rf', + SITE_DIR . $users[$i]; + ); print "Moving user " . colored($users[$i], 'bold green') . " newly generated directory to " . colored(SITE_DIR, 'bold') . ".\n"; + move(TMP_DIR . $users[$i], SITE_DIR . $users[$i]); $i += 1; } rmdir(TMP_DIR); -- cgit v1.2.3