diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-07-07 20:49:26 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-07-07 20:49:26 +0200 |
commit | c546fee3fa3f3f1430bd289c51fc6a9e1a1030bf (patch) | |
tree | 5cf3e5c2396ef327383fba372cedfccf7bb5d98f /src/update-gitjoe.pl | |
parent | test (diff) | |
download | joe-scripts-c546fee3fa3f3f1430bd289c51fc6a9e1a1030bf.tar.gz joe-scripts-c546fee3fa3f3f1430bd289c51fc6a9e1a1030bf.tar.bz2 joe-scripts-c546fee3fa3f3f1430bd289c51fc6a9e1a1030bf.tar.xz joe-scripts-c546fee3fa3f3f1430bd289c51fc6a9e1a1030bf.tar.zst joe-scripts-c546fee3fa3f3f1430bd289c51fc6a9e1a1030bf.zip |
Better dir
Diffstat (limited to '')
-rwxr-xr-x | src/update-gitjoe.pl (renamed from update-gitjoe.pl) | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/update-gitjoe.pl b/src/update-gitjoe.pl index 6a10b5e..a0471ee 100755 --- a/update-gitjoe.pl +++ b/src/update-gitjoe.pl @@ -6,13 +6,13 @@ use Term::ANSIColor; sub get_repos_index { my $user = $_[0]; - my $homedir = '/usr/home/' . $user . '/'; - opendir(DIR, $homedir); + my $home_dir = '/usr/home/' . $user . '/'; + opendir(DIR, $home_dir); my @repos; my $i = 0; while (my $dir = readdir(DIR)) { next if ($dir =~ m/^\./); - next if (!(-e $homedir . $dir . '/git-daemon-export-ok')); + next if (!(-e $home_dir . $dir . '/git-daemon-export-ok')); $repos[$i] = $dir; $i += 1; } @@ -30,17 +30,18 @@ sub get_repos_index { sub stagit_generate { my ($user, @repos) = @_; my $i = 0; + my $site_dir = '/usr/local/www/git-jozan/'; + chdir($site_dir); while ($i < @repos) { - print colored($repos[$i], 'bold red') . "\n"; $i += 1; } return; } sub main { - my $homedir = '/usr/home/'; + my $home_dir = '/usr/home/'; my @users; - opendir(DIR, $homedir); + opendir(DIR, $home_dir); my $i = 0; while (my $dir = readdir(DIR)) { next if ($dir eq 'git-ro'); |