aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
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