aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-07-09 17:55:52 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-07-09 17:55:52 +0200
commit99e7509d25fc6c108838f01734f6e6c41527f7d7 (patch)
tree2657efed68f08e5f6adb33353def1f2c0b6bbc63
parentFucked up (diff)
downloadjoe-scripts-99e7509d25fc6c108838f01734f6e6c41527f7d7.tar.gz
joe-scripts-99e7509d25fc6c108838f01734f6e6c41527f7d7.tar.bz2
joe-scripts-99e7509d25fc6c108838f01734f6e6c41527f7d7.tar.xz
joe-scripts-99e7509d25fc6c108838f01734f6e6c41527f7d7.tar.zst
joe-scripts-99e7509d25fc6c108838f01734f6e6c41527f7d7.zip
More log messages, improved seds
-rwxr-xr-xsrc/gitjoe/addsshkey.pl1
-rwxr-xr-xsrc/gitjoe/adduser.pl1
-rwxr-xr-xsrc/gitjoe/chdesc.pl2
-rwxr-xr-xsrc/gitjoe/chowner.pl3
-rwxr-xr-xsrc/update/gitjoe.pl2
5 files changed, 8 insertions, 1 deletions
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;
}
diff --git a/src/update/gitjoe.pl b/src/update/gitjoe.pl
index e103f1a..aaeb3d3 100755
--- a/src/update/gitjoe.pl
+++ b/src/update/gitjoe.pl
@@ -68,7 +68,7 @@ sub stagit_generate {
system(
'/usr/local/bin/dash',
'-c',
- "/usr/bin/sed 's/<span class=\"desc\">Repositories<\\/span>/<span class=\"desc\"><h1>Repositories<\\/h1><\\/span>/' sedded_index.html >re_sedded_index.html"
+ "/usr/bin/sed 's/<td><span class=\"desc\">Repositories<\\/span><\\/td>/<td><span class=\"desc\"><h1>" $user " - Repositories<\\/h1><\\/span><\\/td><td> - back to <a href=\"https:\\/\\/git.jozanleclerc.xyz\\/\">GitJoe<\\/a><\\/td>/' sedded_index.html >re_sedded_index.html"
);
unlink('./sedded_index.html');
system(