/usr/bin/ceres-tree-create is in python-ceres 0.10.0~git20150525-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 | #!/usr/bin/python
import sys
from optparse import OptionParser
from ceres import CeresTree
parser = OptionParser(usage='''%prog [options] <path/to/tree/root/> [property=value]*''')
parser.add_option('--verbose', action='store_true')
options, args = parser.parse_args()
if not args:
print "You must specify a root directory for the tree"
parser.print_usage()
sys.exit(1)
root_dir = args[0]
props = {}
for arg in args[1:]:
prop, value = arg.split('=', 1)
try: # convert numeric types
value = float(value)
except:
try:
value = int(value)
except:
pass
props[prop] = value
if options.verbose:
print "Creating tree at %s with props=%s" % (root_dir, props)
tree = CeresTree.createTree(root_dir, **props)
|