diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-07-07 20:04:31 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-07-07 20:04:31 +0200 |
commit | ce70c062c6e2b796456cd548f2f1254b82b54d3b (patch) | |
tree | d0c2b4fe79701b2d9666b3508a358273858edb4d /update-gitjoe.pl | |
parent | Ok now this should be good (diff) | |
download | joe-scripts-ce70c062c6e2b796456cd548f2f1254b82b54d3b.tar.gz joe-scripts-ce70c062c6e2b796456cd548f2f1254b82b54d3b.tar.bz2 joe-scripts-ce70c062c6e2b796456cd548f2f1254b82b54d3b.tar.xz joe-scripts-ce70c062c6e2b796456cd548f2f1254b82b54d3b.tar.zst joe-scripts-ce70c062c6e2b796456cd548f2f1254b82b54d3b.zip |
Good start
Diffstat (limited to '')
-rwxr-xr-x | update-gitjoe.pl | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/update-gitjoe.pl b/update-gitjoe.pl index b79f9aa..a4eccdd 100755 --- a/update-gitjoe.pl +++ b/update-gitjoe.pl @@ -5,6 +5,22 @@ use warnings; use Term::ANSIColor; sub main { + my $homedir = '/usr/home/'; + my @users; + opendir(DIR, $homedir); + my $i = 0; + while (my $dir = readdir(DIR)) { + next if ($dir eq 'git-ro'); + next if ($dir =~ m/^\./); + $users[$i] = $dir; + $i += 1; + } + closedir(DIR); + $i = 0; + while ($i < @users) { + print $users[$i] . "\n"; + $i += 1; + } exit; } |