From 11e8c8568d368ece636a9e4a5ac202a4b10dc373 Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Fri, 9 Nov 2012 10:32:53 -0800 Subject: Updated README. Forced hostname to lowercase. --- README.txt | 31 ++++++++++++++++++++++++++----- setup.py | 2 +- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/README.txt b/README.txt index 5b86774..a1baaf5 100644 --- a/README.txt +++ b/README.txt @@ -13,16 +13,37 @@ host-overrides/ host (or domain) specific extensions. bismuth.jesterpm.net/ These files override those in jesterpm.net/ - on bismuth.jesterpm.net in + on bismuth.jesterpm.net. setup.py A script to setup links to the dot files. setup.py ------------------------------------------------------------------------------- -The setup scripts makes the following links: - - * For every file X in base/, ~/.X is linked to base/X -If a file already exists, it is deleted unless the --nice flag is given. +Usage: ./setup.py [--nice] [--pretend] [--home=DIRECTORY] + + --nice No destructive action. setup will not delete anything. + --pretend List the symlinks to make, but don't make them. + --home Place the links in DIRECTORY instead of $HOME. + +The setup script makes links from your home directory to the appropriate files +in the dotfiles repository. Unless --nice is specified, it will delete any +file that stands in its way. If it fails to make a link, it will report the +error and continue. + +Suppose your hostname was bismuth.jesterpm.net. The setup script will check +these directories for files in this order: + + * base/ + * host-overrides/net + * host-overrides/jesterpm.net + * host-overrides/bismuth.jesterpm.net + +Files found later supersede files found in previous directories, allowing you +to have specific files for specific hosts or domains. If the script finds a +directory and that directory contains a file called .nolink, then that +directory will be created in $HOME instead of linked, and the appropriate +links will be created inside that directory. This process continues +recursively. diff --git a/setup.py b/setup.py index 0b65c44..4f6cf0c 100755 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ def makeDots(base, home, nice = False, pretend = False): dotfiles = getMap(base + "/base/") # Get host specific overrides - hostname = socket.getfqdn().split(".") + hostname = socket.getfqdn().lower().split(".") for i in range(len(hostname)): name = string.join(hostname[-(i+1):], ".") directory = base + "/host-overrides/" + name -- cgit v1.2.3