From 923502f0e863d5902e52d20fa302481427ca77e1 Mon Sep 17 00:00:00 2001 From: Christopher Harvey Date: Fri, 11 Jun 2010 21:57:14 -0400 Subject: Added ventoo executable, for /usr/bin --- setup.py | 3 +++ ventoo | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100755 ventoo diff --git a/setup.py b/setup.py index 1d665e6..78f04aa 100644 --- a/setup.py +++ b/setup.py @@ -12,6 +12,9 @@ for dirpath, dirnames, filenames in os.walk('modules'): if dirname.startswith('.'): del dirnames[i] built_data_files.append([os.path.join('/usr/share/ventoo/', dirpath), [os.path.join(dirpath, f) for f in filenames]]) +#install the executable +built_data_files.append(['/usr/bin', ['ventoo']]) + #update module search paths for install location f = open("src/ventoo/search_paths.py", 'a') f.write("\nmodules = ['/usr/share/ventoo/modules']\n") diff --git a/ventoo b/ventoo new file mode 100755 index 0000000..d7d9779 --- /dev/null +++ b/ventoo @@ -0,0 +1,34 @@ +#!/usr/bin/env python + +import sys +import os.path as osp +import ventoo.main +import augeas +import shutils +import os + +sandboxDir = '/' + +if len(sys.argv) > 1: + sandboxDir = sys.argv[1] +if not osp.isdir(sandboxDir): + print sandboxDir + " is not a directory." + sys.exit(0) + +print 'Starting augeas...' + #None could be a 'loadpath' +a = augeas.Augeas(sandboxDir, None, augeas.Augeas.SAVE_NEWFILE) +print 'Creating window...' + +if sandboxDir == '/': + pass +#Note, it IS possible to create mutiple windows and augeas +#instances to edit multiple "roots" at the same time. +window = ventoo.main.MainWindow(a) +window.show_all() +window.hideApplyDiffButton() #TODO: overload show_all to preserve apply button state. + +#clear the diff storage place... +shutil.rmtree(ventoo.augeas_utils.getDiffRoot(), True) +os.makedirs(ventoo.augeas_utils.getDiffRoot()) +gtk.main() -- cgit v1.2.3-65-gdbad