summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/lsrc2
-rwxr-xr-xbin/rcdn5
-rwxr-xr-xbin/rcup9
3 files changed, 13 insertions, 3 deletions
diff --git a/bin/lsrc b/bin/lsrc
index f7f4826..1ea2e2c 100755
--- a/bin/lsrc
+++ b/bin/lsrc
@@ -140,7 +140,7 @@ is_metafile() {
host_portion=`echo $1 | sed -e 's/host-.*/host-/'`
tag_portion=`echo $1 | sed -e 's/tag-.*/tag-/'`
- [ x$host_portion = 'xhost-' -o x$tag_portion = 'xtag-' ]
+ [ x$host_portion = 'xhost-' -o x$tag_portion = 'xtag-' -o "x$1" = "xhooks" ]
}
dotfiles_dir_excludes() {
diff --git a/bin/rcdn b/bin/rcdn
index d809796..cae9dc8 100755
--- a/bin/rcdn
+++ b/bin/rcdn
@@ -70,6 +70,9 @@ if [ -e $HOME/.rcrc ]; then
fi
handle_command_line $*
+: ${DOTFILES_DIRS:=$DOTFILES_DIRS $DEFAULT_DOTFILES_DIR}
+
+run_hooks pre down
for dest_and_src in `lsrc $LS_ARGS`; do
saved_ifs=$IFS
@@ -81,3 +84,5 @@ for dest_and_src in `lsrc $LS_ARGS`; do
remove_link $dest $dest $sigil
done
+
+run_hooks post down
diff --git a/bin/rcup b/bin/rcup
index 5f51192..5a42a81 100755
--- a/bin/rcup
+++ b/bin/rcup
@@ -119,13 +119,13 @@ handle_command_line() {
handle_common_flags rcup $version $verbosity
tags=${arg_tags:-$TAGS}
- dotfiles_dirs=${dotfiles_dirs:-$DOTFILES_DIRS}
+ DOTFILES_DIRS=${dotfiles_dirs:-$DOTFILES_DIRS}
files=$@
for tag in $tags; do
LS_ARGS="$LS_ARGS -t $tag"
done
- for dotfiles_dir in $dotfiles_dirs; do
+ for dotfiles_dir in $DOTFILES_DIRS; do
LS_ARGS="$LS_ARGS -d $dotfiles_dir"
done
for exclude in $excludes; do
@@ -146,6 +146,9 @@ if [ -e $HOME/.rcrc ]; then
fi
handle_command_line $*
+: ${DOTFILES_DIRS:=$DOTFILES_DIRS $DEFAULT_DOTFILES_DIR}
+
+run_hooks pre up
for dest_and_src in `lsrc $LS_ARGS`; do
saved_ifs=$IFS
@@ -162,3 +165,5 @@ for dest_and_src in `lsrc $LS_ARGS`; do
handle_file $src $dest $sigil
done
+
+run_hooks post up