forked from tbarron/backscratcher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fab.py
executable file
·57 lines (44 loc) · 1.93 KB
/
fab.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/python
"""
fabricate stuff
For a list of things that can be fabricated,
fab help
Fab is a python-based make substitute for when a make program is not
available or make won't quite do what you want. The equivalent of
'Makefile' for fab is 'fabfile.py'.
In fabfile.py, you can include any python code you want. fab makes
some assumpstions about the structure of your code in fabfile.py:
- fabfile.py entry points (equivalent to make targets) have names
beginning with 'fab_' -- eg., fab_install, fab_clean, etc.
- fabfile.py entry points accept a single argument which is a list of
strings which may include options, suitable for parsing with an
OptionParser().
- each fabfile.py entry point routine begins with a __doc__ string,
delimited by triple quotes. The first line of the __doc__ string
provides a short oneline description which is displayed by 'fab
help'. The second line is blank. The third line provides usage
information. The fourth line is blank. The fifth line and following
provide a detailed description of what the function does.
Copyright (C) 1995 - <the end of time> Tom Barron
tom.barron@comcast.net
177 Crossroads Blvd
Oak Ridge, TN 37830
This software is licensed under the CC-GNU GPL. For the full text of
the license, see http://creativecommons.org/licenses/GPL/2.0/
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
"""
import os
import pdb
import re
import sys
import toolframe
if os.path.exists('fabfile.py'):
from fabfile import *
toolframe.tf_launch('fab')