aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-07-30 01:05:12 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-07-30 01:05:12 +0200
commitc1c334d516e9da5642c61c7e540bd68d0a278531 (patch)
treec975ed8fce71a5cfde9b32d710f8b633648e1969
parentGitjoe update script changes (diff)
downloadjoe-scripts-c1c334d516e9da5642c61c7e540bd68d0a278531.tar.gz
joe-scripts-c1c334d516e9da5642c61c7e540bd68d0a278531.tar.bz2
joe-scripts-c1c334d516e9da5642c61c7e540bd68d0a278531.tar.xz
joe-scripts-c1c334d516e9da5642c61c7e540bd68d0a278531.tar.zst
joe-scripts-c1c334d516e9da5642c61c7e540bd68d0a278531.zip
Try
-rwxr-xr-xsrc/update/gitjoe.pl8
1 files changed, 7 insertions, 1 deletions
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);