aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2024-04-14 23:58:39 +0300
committerSergey Poznyakoff <gray@gnu.org>2024-04-14 23:58:39 +0300
commitf661686411bdd338798f8460d4b2043db7a76768 (patch)
tree599c7118e3924ecbde6afbd54c2349083bffacf2
parent7da77bc3acbae4a63e8a4504e970eb445b73e544 (diff)
downloadsavane-gray-master.tar.gz
savane-gray-master.tar.bz2
Minor change in sv_groupsHEADmaster
* backend/accounts/sv_groups: Add repo.readme statement only if the README.html file exists in the repo and is not empty. * backend/accounts/sv_groups_ldap: Likewise.
-rwxr-xr-xbackend/accounts/sv_groups7
-rwxr-xr-xbackend/accounts/sv_groups_ldap7
2 files changed, 10 insertions, 4 deletions
diff --git a/backend/accounts/sv_groups b/backend/accounts/sv_groups
index 38eddfd..3a0f65e 100755
--- a/backend/accounts/sv_groups
+++ b/backend/accounts/sv_groups
@@ -1,5 +1,5 @@
#! /usr/bin/perl
-# Copyright (C) 2015, 2016 Sergey Poznyakoff <gray@gnu.org>
+# Copyright (C) 2015-2024 Sergey Poznyakoff <gray@gnu.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -313,7 +313,10 @@ if ($updateinfo && ($sys_git_projects_file || $sys_git_cgitrepos_file)) {
print $cgit_fd "repo.path=$dir_git\n";
print $cgit_fd "repo.desc=$ref->{description}\n";
print $cgit_fd "repo.owner=$ref->{owner}\n";
- print $cgit_fd "repo.readme=$dir_git/README.html\n";
+ my $readme = "$dir_git/README.html";
+ if (-r $readme && ! -z $readme) {
+ print $cgit_fd "repo.readme=$readme\n";
+ }
print $cgit_fd "\n";
}
},
diff --git a/backend/accounts/sv_groups_ldap b/backend/accounts/sv_groups_ldap
index 543ee32..dbc8712 100755
--- a/backend/accounts/sv_groups_ldap
+++ b/backend/accounts/sv_groups_ldap
@@ -1,5 +1,5 @@
#! /usr/bin/perl
-# Copyright (C) 2015, 2016, 2019 Sergey Poznyakoff <gray@gnu.org>
+# Copyright (C) 2015-2024 Sergey Poznyakoff <gray@gnu.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -304,7 +304,10 @@ if ($updateinfo && ($sys_git_projects_file || $sys_git_cgitrepos_file)) {
print $cgit_fd "repo.path=$dir_git\n";
print $cgit_fd "repo.desc=$ref->{description}\n";
print $cgit_fd "repo.owner=$ref->{owner}\n";
- print $cgit_fd "repo.readme=$dir_git/README.html\n";
+ my $readme = "$dir_git/README.html";
+ if (-r $readme && ! -z $readme) {
+ print $cgit_fd "repo.readme=$readme\n";
+ }
print $cgit_fd "\n";
}
},

Return to:

Send suggestions and report system problems to the System administrator.