diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-07-07 21:07:54 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-07-07 21:07:54 +0200 |
commit | 06a69668c64ca72c44097dda0b9a10b633e87986 (patch) | |
tree | 2d55f7d2b7e18d5ba560742ddc86a0e6663d5b6d /src | |
parent | Better dir (diff) | |
download | joe-scripts-06a69668c64ca72c44097dda0b9a10b633e87986.tar.gz joe-scripts-06a69668c64ca72c44097dda0b9a10b633e87986.tar.bz2 joe-scripts-06a69668c64ca72c44097dda0b9a10b633e87986.tar.xz joe-scripts-06a69668c64ca72c44097dda0b9a10b633e87986.tar.zst joe-scripts-06a69668c64ca72c44097dda0b9a10b633e87986.zip |
Test with that
Diffstat (limited to 'src')
-rwxr-xr-x | src/update-gitjoe.pl | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/update-gitjoe.pl b/src/update-gitjoe.pl index a0471ee..01f75a8 100755 --- a/src/update-gitjoe.pl +++ b/src/update-gitjoe.pl @@ -29,12 +29,37 @@ sub get_repos_index { sub stagit_generate { my ($user, @repos) = @_; - my $i = 0; my $site_dir = '/usr/local/www/git-jozan/'; + my $home_dir = '/usr/local/' . $user . '/'; chdir($site_dir); + system( + '/usr/local/bin/dash', + '-c', + '/bin/rm -rf ' . $user . '/' + ); + mkdir($user, 0755); + chdir($site_dir . $user . '/'); + my $i = 0; + my $repos_line = ""; while ($i < @repos) { + $repos_line = $repos_line . ' ' . $home_dir . $repos[$i] . '/'; + substr($repos[$i], -4) = ""; + mkdir($repos[$i], 0755); + $repos[$i] = $repos[$i] . '.git'; + chdir($site_dir . $user . '/' . $repos[$i] . '/'); + system( + '/usr/local/bin/dash', + '-c', + '/usr/local/bin/stagit ' . $home_dir . $repos[$i] . '/' + ); $i += 1; } + chdir($site_dir . $user . '/'); + system( + '/usr/local/bin/dash', + '-c', + '/usr/local/bin/stagit-index ' . $repos_line . '> index.html' + ); return; } |