1#!/usr/bin/env python 2# -*- mode: python; coding: utf-8 -*- 3# :Progetto: vcpx -- Frontend 4# :Creato: lun 03 mag 2004 01:39:00 CEST 5# :Autore: Lele Gaifax <lele@nautilus.homeip.net> 6# :Licenza: GNU General Public License 7# 8 9""" 10Keep a tree in sync with its "upstream" repository of a (possibly) 11different format. 12 13For more documentation, see the README file from the distribution. 14""" 15from __future__ import print_function 16 17__docformat__ = 'reStructuredText' 18 19if __name__ == '__main__': 20 import sys 21 import locale 22 23 locale.setlocale(locale.LC_CTYPE, '') 24 if len(sys.argv)>1 and sys.argv[1] == 'test': 25 from vcpx.tests import main 26 sys.argv[0] += " test" 27 del sys.argv[1] 28 main() 29 else: 30 from vcpx.tailor import main, TailorException 31 32 if len(sys.argv) == 1: 33 sys.argv.append('--help') 34 35 try: 36 main() 37 except TailorException as exc: 38 print("%s: %s" % (exc.__doc__, exc)) 39 except KeyboardInterrupt: 40 print("Stopped by user") 41