From 99e7509d25fc6c108838f01734f6e6c41527f7d7 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Thu, 9 Jul 2020 17:55:52 +0200 Subject: More log messages, improved seds --- src/gitjoe/addsshkey.pl | 1 + src/gitjoe/adduser.pl | 1 + src/gitjoe/chdesc.pl | 2 ++ src/gitjoe/chowner.pl | 3 +++ 4 files changed, 7 insertions(+) (limited to 'src/gitjoe') diff --git a/src/gitjoe/addsshkey.pl b/src/gitjoe/addsshkey.pl index d7e0477..c25c879 100755 --- a/src/gitjoe/addsshkey.pl +++ b/src/gitjoe/addsshkey.pl @@ -20,6 +20,7 @@ sub main { open(my $fh, '>>:encoding(UTF-8)', $home_dir . '.ssh/authorized_keys'); print $fh "$sshkey\n"; close($fh); + print "Added new ssh key for user " . colored($usr, 'bold green') . ".\n"; exit; } diff --git a/src/gitjoe/adduser.pl b/src/gitjoe/adduser.pl index a141277..e4581b9 100755 --- a/src/gitjoe/adduser.pl +++ b/src/gitjoe/adduser.pl @@ -69,6 +69,7 @@ EOF" '-c', '/bin/chmod -v 600 ' . $home_dir . '.ssh/authorized_keys' ); + print "Created new git user " . colored($usr, 'bold green') . ".\n"; exit; } diff --git a/src/gitjoe/chdesc.pl b/src/gitjoe/chdesc.pl index 38e2349..f0fa722 100755 --- a/src/gitjoe/chdesc.pl +++ b/src/gitjoe/chdesc.pl @@ -29,6 +29,8 @@ sub main { '-c', '/usr/sbin/chown -v ' . $usr . ':' . $usr . ' ' . $home_dir . $repo . 'description' ); + print "Changed git repository " . colored($repo, 'bold green') . " description for user " . colored($usr, 'bold') . ".\n" + "New description: ". colored($desc, 'bold green') . ".\n"; exit; } diff --git a/src/gitjoe/chowner.pl b/src/gitjoe/chowner.pl index 8a421f4..bd59aac 100755 --- a/src/gitjoe/chowner.pl +++ b/src/gitjoe/chowner.pl @@ -29,6 +29,9 @@ sub main { '-c', '/usr/sbin/chown -v ' . $usr . ':' . $usr . ' ' . $home_dir . $repo . 'owner' ); + substr($repo, -1) = ""; + print "Changed git repository " . colored($repo, 'bold green') . " owner for user " . colored($usr, 'bold') . ".\n" + "New owner: ". colored($owner, 'bold green') . ".\n"; exit; } -- cgit v1.2.3