summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2012-11-19 14:08:50 -0800
committerJesse Morgan <morganjm@amazon.com>2012-11-19 14:08:50 -0800
commitbee41e3335a049dd21dae105087fef3ad508b5ff (patch)
tree772c6515ee4138bd2954b0128fb91adeec741666
parent146268c112e7fda808670468b40a7322f04bc148 (diff)
parentdf96f9eded4327999f727e68d3c442d0f1c43bca (diff)
Merge branch 'jesterpm' of https://github.com/jesterpm/dotfiles into jesterpm
-rw-r--r--README.txt31
-rwxr-xr-xsetup.py2
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