Skip to content

Commit

Permalink
Make --all-years option return all currently present years
Browse files Browse the repository at this point in the history
  • Loading branch information
lauft committed Nov 15, 2024
1 parent b556d81 commit 7e23ee6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/update-locale
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ while [[ -n "${1}" ]] ; do
formats+=( "${1}" )
;;
--all-years)
while IFS='' read -r line; do years+=("$line"); done < <( seq "2011" "$( date "+%Y" )" )
while IFS='' read -r line; do years+=( "${line}" ); done < <( find "${LOCALE_DIR}" -regex '.*/..-../[0-9][0-9][0-9][0-9]\..*' | sed "s|${LOCALE_DIR}/..-../\(....\).*|\1|" | sort -u )
;;
--all-locales)
while IFS=' ' read -r line ; do locales+=( "${line}" ) ; done < <( find "${LOCALE_DIR}" -name "??-??" | sed "s|${LOCALE_DIR}/\(..-..\)|\1|" )
while IFS=' ' read -r line ; do locales+=( "${line}" ) ; done < <( find "${LOCALE_DIR}" -name "??-??" | sed "s|${LOCALE_DIR}/\(..-..\)|\1|" )
;;
--commit)
DO_COMMIT="yes"
Expand Down

0 comments on commit 7e23ee6

Please sign in to comment.