diff options
author | Laurent Bachelier <laurent@bachelier.name> | 2010-05-09 23:33:43 +0200 |
---|---|---|
committer | Laurent Bachelier <laurent@bachelier.name> | 2010-05-09 23:33:43 +0200 |
commit | 31a44743c9a318a8fe590e7d6244dfbe1a1de2e5 (patch) | |
tree | de592ebe5c372491bfd3249a9b4ac4201581a8a8 /sync.py | |
parent | Alias to quickly and properly create a tar.bz2 out of a version tag (diff) | |
download | public-dotfiles-31a44743c9a318a8fe590e7d6244dfbe1a1de2e5.tar.xz |
script to launch confman
Diffstat (limited to 'sync.py')
-rwxr-xr-x | sync.py | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -0,0 +1,30 @@ +#!/usr/bin/env python +from confman import ConfigSource +import sync_options as options + +from os import path +base_path = path.join(path.dirname(__file__), '..') + +def privpub(dir): + return [path.join("private", dir), path.join("public", dir)] + +dirs = privpub("base") +if "desktop" in options.tags and not options.is_root: + dirs += privpub("desktop") + +for dir in dirs: + base_dir = path.normpath(path.join(base_path, dir)) + print base_dir + " => " + "~" + + ConfigSource(base_dir, "~", None, options).sync() + +# FIXME remove the "desktop" condition when possible +if options.is_root and options.is_gentoo and "desktop" in options.tags: + dirs = privpub("gentoo") + + for dir in dirs: + base_dir = path.normpath(path.join(base_path, dir)) + print base_dir + " => " + "/etc" + + c = ConfigSource(base_dir, "/etc", None, options).sync() + |