From 9a3f6cc532080a5b7095037835f778c9a621f642 Mon Sep 17 00:00:00 2001 From: Christian Höltje Date: Wed, 18 Mar 2015 22:45:22 -0400 Subject: Changes the priority to: hosts->tags->default This changes the order that things are pulled in so that: 1. Hosts take priority over everything. 2. Tags take priority over default. 3. Default takes priority over nothing. Closes #94 --- bin/lsrc.in | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'bin') diff --git a/bin/lsrc.in b/bin/lsrc.in index ada436b..47ae889 100755 --- a/bin/lsrc.in +++ b/bin/lsrc.in @@ -323,21 +323,6 @@ for DOTFILES_DIR in $DOTFILES_DIRS; do cd "$DOTFILES_DIR" DIR_STACK=":$DOTFILES_DIR" - for file in ${FILES:-*}; do - dotted=0 - if is_metafile "$file"; then - continue - fi - - if is_excluded "$file" "$undotted_file_globs" "$never_undotted_file_globs"; then - dotted=1 - fi - - handle_file "$file" "$DEST_DIR" "$DOTFILES_DIR" . "$dotted" "$exclude_file_globs" "$include_file_globs" "$symlink_dirs_file_globs" "$mk_dirs_file_globs" - done - - cd "$DOTFILES_DIR" - host_files="$DOTFILES_DIR/host-$HOSTNAME" if [ -d "$host_files" ]; then pushdir "$(basename "$host_files")" @@ -369,4 +354,18 @@ for DOTFILES_DIR in $DOTFILES_DIRS; do fi done + cd "$DOTFILES_DIR" + + for file in ${FILES:-*}; do + dotted=0 + if is_metafile "$file"; then + continue + fi + + if is_excluded "$file" "$undotted_file_globs" "$never_undotted_file_globs"; then + dotted=1 + fi + + handle_file "$file" "$DEST_DIR" "$DOTFILES_DIR" . "$dotted" "$exclude_file_globs" "$include_file_globs" "$symlink_dirs_file_globs" "$mk_dirs_file_globs" + done done -- cgit v1.2.3