aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-04-06 15:54:57 -0300
committerEuAndreh <eu@euandre.org>2023-04-06 15:54:57 -0300
commit5d72183ec12014349285dd9d221e355a88bf385c (patch)
treec87618760a41bb41c3fcf9185e7fd59a2f3f43ca /bin
parentaux/po4a-cfg.sh: Include whatever is given via STDIN (diff)
downloaddotfiles-5d72183ec12014349285dd9d221e355a88bf385c.tar.gz
dotfiles-5d72183ec12014349285dd9d221e355a88bf385c.tar.xz
bin/aux: Recover [FILE...] argument handling
Diffstat (limited to 'bin')
-rwxr-xr-xbin/aux19
1 files changed, 14 insertions, 5 deletions
diff --git a/bin/aux b/bin/aux
index 93952b9..e092b1f 100755
--- a/bin/aux
+++ b/bin/aux
@@ -95,9 +95,18 @@ cp_empty() {
fi
}
-for d in "$D"/cases/*/; do
- fn="$(basename "$d")"
- find "$d" -not -type d | while read -r f; do
- "$fn" "$f" "${f#"$D/cases/$fn/"}"
+
+if [ $# = 0 ]; then
+ for d in "$D"/cases/*/; do
+ fn="$(basename "$d")"
+ find "$d" -not -type d | while read -r f; do
+ "$fn" "$f" "${f#"$D/cases/$fn/"}"
+ done
done
-done
+else
+ for to in "$@"; do
+ find "$D" -not -type d | grep "$to"$ | while read -r from; do
+ cp_all "$from" "$to"
+ done
+ done
+fi