Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Sympa
Commits
0cf3c5d9
Unverified
Commit
0cf3c5d9
authored
Apr 23, 2019
by
Luc Didry
Browse files
Fix #595 according to @ikedas review
parent
07441b18
Changes
3
Show whitespace changes
Inline
Side-by-side
Makefile.am
View file @
0cf3c5d9
...
...
@@ -139,9 +139,9 @@ installconfig: installdir
fi
@
echo
"Installing configuration template ..."
\
echo
"installing sympa.conf-dist"
;
\
$(INSTALL)
-m
644
-T
sympa.conf-dist
$(DESTDIR)$(
sys
confdir)
/sympa.conf-dist
;
\
chown
$(USER)
$(DESTDIR)$(
sys
confdir)
/sympa.conf-dist
;
\
chgrp
$(GROUP)
$(DESTDIR)$(
sys
confdir)
/sympa.conf-dist
;
$(INSTALL)
-m
644
-T
sympa.conf-dist
$(DESTDIR)$(confdir)
/sympa.conf-dist
;
\
chown
$(USER)
$(DESTDIR)$(confdir)
/sympa.conf-dist
;
\
chgrp
$(GROUP)
$(DESTDIR)$(confdir)
/sympa.conf-dist
;
-
@if
[
!
-f
$(DESTDIR)$(sysconfdir)
/data_structure.version
]
;
then
\
cd
$(DESTDIR)$(sysconfdir)
;
\
echo
"# automatically created file"
>>
data_structure.version
;
\
...
...
@@ -185,7 +185,7 @@ nextstep:
@
echo
"#"
@
echo
"# ADDITIONAL SETTINGS:"
@
echo
"# * You will find all available configuration settings in:"
@
echo
"#
$(
sys
confdir)
/sympa.conf-dist"
@
echo
"#
$(confdir)
/sympa.conf-dist"
@
echo
"#"
@
echo
"# * Copy the configuration settings you want in:"
@
echo
"#
$(confdir)
/sympa.conf"
...
...
@@ -215,13 +215,6 @@ tidyall:
all-local
:
sympa.conf-dist
sympa.conf-dist
:
mk-sympa-dist.pl
@
./
mk-sympa-dist.pl
sympa.conf-dist
:
@
$(PERL)
mk-sympa-dist.pl
mk-sympa-dist.pl
:
@
rm
-f
$@
$(AM_V_GEN)$(SED)
\
-e
's|--PERL--|
$(PERL)
|'
\
-e
's|--srcdir--|
$(srcdir)
|'
\
<
$(srcdir)
/
$@
.in
>
$@
@
chmod
+x
$@
configure.ac
View file @
0cf3c5d9
...
...
@@ -610,6 +610,7 @@ AC_SUBST(POSTMAP_ARG)
AC_CONFIG_FILES([
Makefile
sympa.conf
mk-sympa-dist.pl
default/Makefile
doc/Makefile
po/Makefile
...
...
mk-sympa-dist.pl.in
100755 → 100644
View file @
0cf3c5d9
#!--PERL--
# -*- indent-tabs-mode: nil; -*-
# vim:ft=perl:et:sw=4
# $Id$
# Sympa - SYsteme de Multi-Postage Automatique
#
# Copyright (c) 1997, 1998, 1999 Institut Pasteur & Christophe Wolfhugel
# Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
# 2006, 2007, 2008, 2009, 2010, 2011 Comite Reseau des Universites
# Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017 GIP RENATER
# Copyright 2018 The Sympa Community. See the AUTHORS.md file at the
# Copyright 2019 The Sympa Community. See the AUTHORS.md file at the
# top-level directory of this distribution and at
# <https://github.com/sympa-community/sympa.git>.
#
...
...
@@ -26,7 +21,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
use
lib
'
--srcdir--/
src/lib/
';
use
lib
'
src/lib/
';
use
strict
;
use
warnings
;
use
English
qw(-no_match_vars)
;
...
...
@@ -78,7 +73,8 @@ if ($modfail) {
my
$dist_conf
=
'
sympa.conf-dist
';
my
$umask
=
umask
037
;
unless
(
open
NEWF
,
'
>
',
$dist_conf
)
{
my
$fh
;
unless
(
open
$fh
,
'
>
',
$dist_conf
)
{
umask
$umask
;
die
"
$0:
"
.
sprintf
(
gettext
("
Unable to open %s : %s
"),
$dist_conf
,
$ERRNO
)
...
...
@@ -97,38 +93,38 @@ foreach my $param (@Sympa::ConfDef::params) {
next
unless
$param
->
{'
file
'};
if
(
$title
)
{
printf
NEWF
"
###
\\\\\\\\
%s ////###
\n\n
",
$title
;
printf
$fh
"
###
\\\\\\\\
%s ////###
\n\n
",
$title
;
undef
$title
;
}
printf
NEWF
"
## %s
\n
",
$param
->
{'
name
'};
printf
$fh
"
## %s
\n
",
$param
->
{'
name
'};
if
(
$param
->
{'
gettext_id
'})
{
print
NEWF
Sympa::Tools::Text::
wrap_text
(
print
$fh
Sympa::Tools::Text::
wrap_text
(
gettext
(
$param
->
{'
gettext_id
'}),
'
##
',
'
##
');
}
print
NEWF
Sympa::Tools::Text::
wrap_text
(
print
$fh
Sympa::Tools::Text::
wrap_text
(
gettext
(
$param
->
{'
gettext_comment
'}),
'
##
',
'
##
')
if
$param
->
{'
gettext_comment
'};
if
(
defined
$param
->
{'
sample
'})
{
printf
NEWF
'
##
'
.
gettext
('
Example:
')
.
"
%s
\t
%s
\n
",
printf
$fh
'
##
'
.
gettext
('
Example:
')
.
"
%s
\t
%s
\n
",
$param
->
{'
name
'},
$param
->
{'
sample
'};
}
if
(
defined
$param
->
{'
default
'})
{
printf
NEWF
"
#%s
\t
%s
\n
",
$param
->
{'
name
'},
$param
->
{'
default
'};
printf
$fh
"
#%s
\t
%s
\n
",
$param
->
{'
name
'},
$param
->
{'
default
'};
}
elsif
(
$param
->
{'
optional
'})
{
printf
NEWF
"
#%s
\t\n
",
$param
->
{'
name
'};
printf
$fh
"
#%s
\t\n
",
$param
->
{'
name
'};
}
else
{
printf
NEWF
"
#%s
\t
%s
\n
",
$param
->
{'
name
'},
printf
$fh
"
#%s
\t
%s
\n
",
$param
->
{'
name
'},
gettext
("
(You must define this parameter)
");
}
print
NEWF
"
\n
";
print
$fh
"
\n
";
}
close
NEWF
;
close
$fh
;
print
STDERR
"
$dist_conf
file has been created
\n
";
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment