Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Kevin Lyda
chkcrontab
Commits
e0450dcc
Commit
e0450dcc
authored
May 27, 2012
by
Kevin Lyda
💬
Browse files
Manpage edits and installer.
parent
f55b63de
Changes
3
Hide whitespace changes
Inline
Side-by-side
doc/chkcrontab.1
View file @
e0450dcc
...
...
@@ -61,8 +61,10 @@ Reports any bare \fB%\fP in a command.
.UNINDENT
.SH BUGS
.sp
Quite possibly. Report them via the \fI\%issue tracker\fP at the project
website.
Quite possibly. Report them via the issue tracker at the project
website:
.sp
\fI\%http://code.google.com/p/chkcrontab/issues/list\fP
.SH SEE ALSO
.sp
\fBlint\fP (1)
...
...
doc/chkcrontab.1.rst
View file @
e0450dcc
...
...
@@ -36,8 +36,10 @@ The following check are run against the given crontab file.
Bugs
----
Quite possibly. Report them via the `issue tracker`_ at the project
website.
Quite possibly. Report them via the issue tracker at the project
website:
http://code.google.com/p/chkcrontab/issues/list
See Also
--------
...
...
@@ -52,5 +54,3 @@ Copying
Copyright (C) 2012 Kevin Lyda.
Free use of this software is granted under the terms of the GNU General
Public License version 3 or any later version.
.. _`issue tracker`: http://code.google.com/p/chkcrontab/issues/list
setup.py
View file @
e0450dcc
...
...
@@ -20,7 +20,9 @@ This installs the chkcrontab command and the crontab.check module.
import
os
import
sys
from
distutils
import
file_util
from
distutils
import
log
from
distutils.command.install
import
install
from
distutils.core
import
setup
from
distutils.core
import
Command
if
sys
.
version_info
<
(
2
,
7
):
...
...
@@ -31,7 +33,7 @@ else:
BASE_DIR
=
os
.
path
.
dirname
(
globals
().
get
(
'__file__'
,
os
.
getcwd
()))
class
TestC
omman
d
(
Command
):
class
TestC
m
d
(
Command
):
description
=
'Runs all available tests.'
user_options
=
[
]
...
...
@@ -50,7 +52,7 @@ class TestCommand(Command):
if
not
result
.
wasSuccessful
():
sys
.
exit
(
1
)
class
CleanC
omman
d
(
Command
):
class
CleanC
m
d
(
Command
):
description
=
'Remove all generated files.'
user_options
=
[
]
...
...
@@ -117,9 +119,45 @@ class CleanCommand(Command):
except
:
log
.
warn
(
'unable to remove "%s"'
,
os
.
path
.
normpath
(
accused
))
class
InstallCmd
(
install
):
user_options
=
install
.
user_options
[:]
user_options
.
extend
([(
'manprefix='
,
None
,
'installation prefix for man pages'
)])
def
initialize_options
(
self
):
self
.
manprefix
=
None
install
.
initialize_options
(
self
)
def
finalize_options
(
self
):
install
.
finalize_options
(
self
)
if
self
.
manprefix
is
None
:
self
.
manprefix
=
os
.
path
.
join
(
self
.
install_scripts
,
'..'
,
'share'
,
'man'
)
def
run
(
self
):
install
.
run
(
self
)
manpages
=
[
'doc/chkcrontab.1'
]
if
self
.
manprefix
:
for
manpage
in
manpages
:
section
=
manpage
.
split
(
'/'
)[
-
1
].
split
(
'.'
)[
-
1
]
manpage_file
=
manpage
.
split
(
'/'
)[
-
1
]
manpage_dir
=
os
.
path
.
realpath
(
os
.
path
.
join
(
self
.
manprefix
,
'man%s'
%
section
))
if
not
self
.
dry_run
:
try
:
os
.
makedirs
(
manpage_dir
)
except
OSError
:
pass
file_util
.
copy_file
(
manpage
,
os
.
path
.
join
(
manpage_dir
,
manpage_file
),
dry_run
=
self
.
dry_run
)
setup
(
cmdclass
=
{
'test'
:
TestCommand
,
'dist_clean'
:
CleanCommand
cmdclass
=
{
'test'
:
TestCmd
,
'dist_clean'
:
CleanCmd
,
'dist_clean'
:
CleanCmd
,
'install'
:
InstallCmd
,
},
name
=
'chkcrontab'
,
version
=
'1.2'
,
...
...
Write
Preview
Markdown
is supported
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