bh@287: #! /usr/bin/python bh@287: # Copyright (C) 2007, 2009 by Intevation GmbH bh@91: # Authors: bh@91: # Bernhard Herzog bh@91: # bh@91: # This program is free software under the GPL (>=v2) bh@91: # Read the file COPYING coming with the software for details. bh@91: bh@91: """Sends instructions to a running packager""" bh@91: bh@91: import sys bh@91: bh@91: import treepkgcmd bh@91: from treepkg.options import create_parser bh@91: from treepkg.readconfig import read_config bh@91: from treepkg.util import writefile bh@91: bh@91: def main(): bh@91: options, args = create_parser().parse_args() bh@91: bh@91: if len(args) != 1: bh@91: print >>sys.stderr, "The command to send to treepkg must be given" bh@91: sys.exit(1) bh@91: bh@91: treepkg_opts, packager_opts = read_config(options.config_file) bh@91: bh@91: filename = treepkg_opts.get("instructions_file") bh@91: if filename: bh@91: writefile(filename, args[0]) bh@91: bh@91: main()