Mercurial > hg > config
comparison python/install_config.py @ 582:0295141d9eeb
stub
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Tue, 21 Jan 2014 09:16:36 -0800 |
parents | b563a9c1f2b7 |
children | ed99a36df540 |
comparison
equal
deleted
inserted
replaced
581:f7ff0054c7c2 | 582:0295141d9eeb |
---|---|
79 | 79 |
80 | 80 |
81 #@requires(Command('git')) | 81 #@requires(Command('git')) |
82 #class GitInstall | 82 #class GitInstall |
83 | 83 |
84 class UbuntuPackages(Step): | 84 class DebianPackages(Step): |
85 """ubuntu packages to install""" | 85 """ubuntu packages to install""" |
86 | 86 |
87 PACKAGES=["mercurial", | 87 PACKAGES=["mercurial", |
88 "unison", | 88 "unison", |
89 "fluxbox", | 89 "fluxbox", |
97 "git", | 97 "git", |
98 "emacs", | 98 "emacs", |
99 "irssi"] | 99 "irssi"] |
100 def __call__(self): | 100 def __call__(self): |
101 print "Ensure the following packages are installed:" | 101 print "Ensure the following packages are installed:" |
102 print "sudo apt-get install %s" % ' '.join(PACKAGES) | 102 print "sudo apt-get install %s" % ' '.join(self.PACKAGES) |
103 | 103 |
104 | 104 |
105 ### legacy -v- | 105 ### legacy -v- |
106 | 106 |
107 def legacy(): | 107 def legacy(): |
150 execute(*postinstall_commands) | 150 execute(*postinstall_commands) |
151 else: | 151 else: |
152 print "git not installed" | 152 print "git not installed" |
153 | 153 |
154 | 154 |
155 ### CLI | |
155 | 156 |
156 def main(args=sys.argv[1:]): | 157 def main(args=sys.argv[1:]): |
157 | 158 |
158 # go home | 159 # go home |
159 os.chdir(HOME) | 160 os.chdir(HOME) |
170 action='store_true', default=False, | 171 action='store_true', default=False, |
171 help="list steps to be run and exit") | 172 help="list steps to be run and exit") |
172 options, args = parser.parse_args() | 173 options, args = parser.parse_args() |
173 | 174 |
174 # plan steps | 175 # plan steps |
175 steps = [InitializeRepository, UbuntuPackages] | 176 steps = [InitializeRepository, DebianPackages] |
176 if options.debian_packages: | 177 if options.debian_packages: |
177 steps = [DebianPackages] | 178 steps = [DebianPackages] |
178 | 179 |
179 if options.list_steps: | 180 if options.list_steps: |
180 # list steps if specified | 181 # list steps if specified |