aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/aux42
1 files changed, 28 insertions, 14 deletions
diff --git a/bin/aux b/bin/aux
index e51cfe8..b6509d3 100755
--- a/bin/aux
+++ b/bin/aux
@@ -5,7 +5,7 @@ set -eu
usage() {
cat <<-'EOF'
Usage:
- aux
+ aux [FILE...]
aux -h
EOF
}
@@ -18,14 +18,20 @@ help() {
-h, --help show this message
- Hydrate software project with auxiliary files.
+ Hydrate software project with auxiliary files. If FILE is
+ given, restrict effect to those paths.
Examples:
- Just run it:
+ Just run it with default values:
$ aux
+
+
+ Get only the "tests/assert-shellcheck.sh" file:
+
+ $ aux tests/assert-shellcheck.sh
EOF
}
@@ -69,14 +75,22 @@ cp_all() {
done
}
-cp_all \
- aux/.gitignore \
- aux/lib.sh \
- aux/tld.txt \
- aux/workflow/favicon.svg \
- aux/workflow/head.html \
- aux/workflow/md2html.sh \
- aux/workflow/style.css \
- aux/workflow/preamble.md.in \
- aux/workflow/TODOs.sh \
- aux/ci/report.sh \
+FILES='
+aux/.gitignore
+aux/lib.sh
+aux/tld.txt
+aux/workflow/favicon.svg
+aux/workflow/head.html
+aux/workflow/md2html.sh
+aux/workflow/style.css
+aux/workflow/preamble.md.in
+aux/workflow/TODOs.sh
+aux/ci/report.sh
+'
+
+if [ $# = 0 ]; then
+ # shellcheck disable=2086
+ cp_all $FILES
+else
+ cp_all "$@"
+fi