diff options
author | Mike Burns <mike@mike-burns.com> | 2013-08-16 17:41:10 +0200 |
---|---|---|
committer | Mike Burns <mike@mike-burns.com> | 2013-08-16 17:41:10 +0200 |
commit | 971a2f9e5b2bcbfd0e1589dbd0dd602f7e2cd1c9 (patch) | |
tree | c39dd29f6aef2ece5be6a60ad1be18e149f3dbcc /bin | |
parent | 975b347b7206a0e9caeeea8349e4765b4db654f9 (diff) |
Add -kK for rcup and rcdn
The hooks can be skipped using `-K`, if needed and they can be forced
with the `-k` flag.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/rcdn | 4 | ||||
-rwxr-xr-x | bin/rcup | 6 |
2 files changed, 9 insertions, 1 deletions
@@ -22,6 +22,7 @@ handle_command_line() { local arg_tags= local verbosity=0 local version=0 + local run_hooks=0 local dotfiles_dirs= local files= local excludes= @@ -30,6 +31,8 @@ handle_command_line() { while getopts VqvI:x:t:d: opt; do case "$opt" in I) includes="$includes $OPTARG";; + k) run_hooks=1 ;; + K) run_hooks=0 ;; t) arg_tags="$arg_tags $OPTARG" ;; v) verbosity=$(($verbosity + 1));; q) verbosity=$(($verbosity - 1));; @@ -45,6 +48,7 @@ handle_command_line() { tags=${arg_tags:-$TAGS} dotfiles_dirs=${dotfiles_dirs:-$DOTFILES_DIRS} files=$@ + RUN_HOOKS=$run_hooks for tag in $tags; do LS_ARGS="$LS_ARGS -t $tag" @@ -89,6 +89,7 @@ handle_command_line() { local arg_tags= local verbosity=0 local version=0 + local run_hooks=0 local dotfiles_dirs= local files= local excludes= @@ -96,13 +97,15 @@ handle_command_line() { local always_copy=0 REPLACE_ALL=0 - while getopts CVqvfiI:x:t:d: opt; do + while getopts CVqvfikKI:x:t:d: opt; do case "$opt" in C) always_copy=1 ;; d) dotfiles_dirs="$dotfiles_dirs $OPTARG" ;; f) REPLACE_ALL=1 ;; i) REPLACE_ALL=0 ;; I) includes="$includes $OPTARG" ;; + k) run_hooks=1 ;; + K) run_hooks=0 ;; q) verbosity=$(($verbosity - 1)) ;; t) arg_tags="$arg_tags $OPTARG" ;; v) verbosity=$(($verbosity + 1)) ;; @@ -120,6 +123,7 @@ handle_command_line() { tags=${arg_tags:-$TAGS} DOTFILES_DIRS=${dotfiles_dirs:-$DOTFILES_DIRS} + RUN_HOOKS=$run_hooks files=$@ for tag in $tags; do |