/stdhome

To get this branch, use:
bzr branch http://bzr.ed.am/stdhome

« back to all changes in this revision

Viewing changes to lib/stdhome/the.py

  • Committer: Tim Marston
  • Date: 2014-01-05 11:51:35 UTC
  • Revision ID: tim@ed.am-20140105115135-6ses87ggwyjrxzfj
added global objects (the.repo, the.program), deployment object and implemented
init command

Show diffs side-by-side

added added

removed removed

20
20
 
21
21
 
22
22
import os
23
 
import util
24
23
 
25
24
 
26
25
# the program
33
32
repo = None
34
33
 
35
34
# verbose?
36
 
verbose = 0
 
35
verbose = False
37
36
 
38
37
# data directory
39
38
dir = '~/.stdhome'
40
39
 
41
 
# fully qualified data dir
42
 
full_dir = util.canonicalise_path( dir )
43
 
 
44
 
# metadata directory
45
 
mddir = os.path.join( dir, '.metadata' )
46
 
 
47
 
# fully qualified metadata directory
48
 
full_mddir = util.canonicalise_path( mddir )
49
 
 
50
 
# filesystem directory
51
 
fsdir = '~/stdhome-test'
52
 
 
53
 
# fully qualified filesystem directory
54
 
full_fsdir = util.canonicalise_path( fsdir )
 
40
# expanded data dir
 
41
expanded_dir = os.path.expanduser( dir )
 
42
 
 
43
# filesystem dir
 
44
fsdir = '~/'
 
45
 
 
46
# expanded filesystem dir
 
47
expanded_fsdir = os.path.expanduser( fsdir )
55
48
 
56
49
 
57
50
def set_repo( repo_name ):
58
51
        global repo
59
52
        from repo import Repo
60
 
        repo = Repo( repo_name if repo_name else 'test' )
 
53
        repo = Repo( repo_name if repo_name else 'home' )
61
54