summaryrefslogtreecommitdiff
path: root/bin/rcup
diff options
context:
space:
mode:
authorGravatar Mike Burns <mike@mike-burns.com>2013-08-05 04:41:38 +0200
committerGravatar Mike Burns <mike@mike-burns.com>2013-08-05 05:57:18 +0200
commit122bbf0c6da226fc7e8a7e2a8d173b3e6259f7cf (patch)
treea161a071a42e9af7bd7feb301a0497e7d8a2b147 /bin/rcup
parent63b50643b0ffd287d0070e494625056a05081ce8 (diff)
Inclusionary patterns: -I
The `-I` flag serves as an "undo" for the `-e` pattern. It overrides any matching exclusions, allowing for temporary listing/installation/removal. For example, if you want to try a `.pythonrc` but leave it in your `EXCLUDES` in rcrc(5), you can do: rcup -Ipythonrc pythonrc
Diffstat (limited to 'bin/rcup')
-rwxr-xr-xbin/rcup7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/rcup b/bin/rcup
index 7c1cf16..37ccb2f 100755
--- a/bin/rcup
+++ b/bin/rcup
@@ -77,14 +77,16 @@ handle_command_line() {
local dotfiles_dirs=
local files=
local excludes=
+ local includes=
REPLACE_ALL=0
- while getopts Vqvfie:t:d: opt; do
+ while getopts VqvfiI:e:t:d: opt; do
case "$opt" in
e) excludes="$excludes $OPTARG";;
f) REPLACE_ALL=1 ;;
i) REPLACE_ALL=0 ;;
+ I) includes="$includes $OPTARG";;
t) arg_tags="$arg_tags $OPTARG" ;;
v) verbosity=$(($verbosity + 1)) ;;
q) verbosity=$(($verbosity - 1)) ;;
@@ -109,6 +111,9 @@ handle_command_line() {
for exclude in $excludes; do
LS_ARGS="$LS_ARGS -e $exclude"
done
+ for include in $includes; do
+ LS_ARGS="$LS_ARGS -I $include"
+ done
LS_ARGS="$LS_ARGS $files"
$DEBUG "LS_ARGS: $LS_ARGS"