Update workflow in README.dev from subversion to git
[gentoolkit.git] / bin / eclean
1 #!/usr/bin/python
2
3 """Copyright 2003-2010 Gentoo Foundation
4 Distributed under the terms of the GNU General Public License v2
5 """
6
7 from __future__ import print_function
8
9
10 # Meta:
11 __author__ = "Thomas de Grenier de Latour (tgl), " + \
12         "modular re-write by: Brian Dolbec (dol-sen)"
13 __email__ = "degrenier@easyconnect.fr, " + \
14         "brian.dolbec@gmail.com"
15 __version__ = "svn"
16 __productname__ = "eclean"
17 __description__ = "A cleaning tool for Gentoo distfiles and binaries."
18
19
20 import sys
21
22 # This block ensures that ^C interrupts are handled quietly.
23 try:
24         import signal
25
26         def exithandler(signum,frame):
27                 signal.signal(signal.SIGINT, signal.SIG_IGN)
28                 signal.signal(signal.SIGTERM, signal.SIG_IGN)
29                 print()
30                 sys.exit(1)
31
32         signal.signal(signal.SIGINT, exithandler)
33         signal.signal(signal.SIGTERM, exithandler)
34         signal.signal(signal.SIGPIPE, signal.SIG_DFL)
35
36 except KeyboardInterrupt:
37         print()
38         sys.exit(1)
39
40
41 from gentoolkit.eclean.cli import main
42
43 try:
44         main()
45 except KeyboardInterrupt:
46         print("Aborted.")
47         sys.exit(130)
48 sys.exit(0)
49