aboutsummaryrefslogtreecommitdiffstats
path: root/update-gitjoe.pl
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-07-07 20:04:31 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-07-07 20:04:31 +0200
commitce70c062c6e2b796456cd548f2f1254b82b54d3b (patch)
treed0c2b4fe79701b2d9666b3508a358273858edb4d /update-gitjoe.pl
parentOk now this should be good (diff)
downloadjoe-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-xupdate-gitjoe.pl16
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;
}