aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-04-04 06:48:51 -0300
committerEuAndreh <eu@euandre.org>2023-04-04 06:48:51 -0300
commite797c04b80c72ed82cd2ece9b1a7b68cc0730d5f (patch)
treec3fdc513824e0605fa9cc117244ca0841738c1ea /share
parentshare/aux/cases/*/aux/{ci/report.sh,po4a-cfg}.sh: Update and improve help string (diff)
downloaddotfiles-e797c04b80c72ed82cd2ece9b1a7b68cc0730d5f.tar.gz
dotfiles-e797c04b80c72ed82cd2ece9b1a7b68cc0730d5f.tar.xz
share/aux/cases/cp_if/aux/po4a-cfg.sh: Discover files instead of getting them via option
Diffstat (limited to 'share')
-rwxr-xr-xshare/aux/cases/cp_if/aux/po4a-cfg.sh11
1 files changed, 2 insertions, 9 deletions
diff --git a/share/aux/cases/cp_if/aux/po4a-cfg.sh b/share/aux/cases/cp_if/aux/po4a-cfg.sh
index 7813f28..cc74041 100755
--- a/share/aux/cases/cp_if/aux/po4a-cfg.sh
+++ b/share/aux/cases/cp_if/aux/po4a-cfg.sh
@@ -57,11 +57,8 @@ for flag in "$@"; do
esac
done
-while getopts 'f:L:h' flag; do
+while getopts 'h' flag; do
case "$flag" in
- f)
- FILES="$OPTARG"
- ;;
h)
usage
help
@@ -78,10 +75,6 @@ shift $((OPTIND - 1))
. aux/lib.sh
-files() {
- printf '%s' "${FILES:-}" | tr ' ' '\n' | grep .
-}
-
guess_type() {
case "$1" in
*.md)
@@ -104,7 +97,7 @@ cat <<-'EOF'
EOF
-files | while read -r file; do
+git ls-files | grep -F '.en.' | while read -r file; do
TYPE="$(guess_type "$file")"
# shellcheck disable=2016
VAR_FILE="$(printf '%s' "$file" | sed 's|\.en\.|.$lang.|')"