updateSubmodule: Consistently use extended regexes

Change-Id: I6c1e9c50b6ae64d183d2d486a66cceb07f612d06
This commit is contained in:
Ed Sanders 2024-06-20 14:28:54 +01:00
parent 31c8b3a722
commit 13df114f78

View file

@ -48,8 +48,8 @@ fi
# TODO recurse
NEWCHANGES=$(git log ..$TARGET --oneline --no-merges --topo-order --reverse --color=never)
TASKS=$(git log ..$TARGET --no-merges --format=format:%B | grep "Bug: T" | sort | uniq)
ADDED_I18N_KEYS=$(git diff HEAD..$TARGET -- i18n/en.json | grep '^\+' | grep --color=never -v '^\+\+\+' | sed -E 's/^\+\s*"([^"]+)":.*/\1/' | sed 's/^/- /' || :)
DELETED_I18N_KEYS=$(git diff HEAD..$TARGET -- i18n/en.json | grep '^\-' | grep --color=never -v '^\-\-\-' | sed -E 's/^\-\s*"([^"]+)":.*/\1/' | sed 's/^/- /' || :)
ADDED_I18N_KEYS=$(git diff HEAD..$TARGET -- i18n/en.json | grep -E '^\+' | grep --color=never -vE '^\+\+\+' | sed -E 's/^\+\s*"([^"]+)":.*/\1/' | sed 's/^/- /' || :)
DELETED_I18N_KEYS=$(git diff HEAD..$TARGET -- i18n/en.json | grep -E '^\-' | grep --color=never -vE '^\-\-\-' | sed -E 's/^\-\s*"([^"]+)":.*/\1/' | sed 's/^/- /' || :)
# Ensure script continues if grep "fails" (returns nothing) with || : (due to -e flag in bash)
ADDED_FILES=$(git diff HEAD..$TARGET --name-only --diff-filter=A | grep --color=never -E "\.(js|css|less)$" | sed 's/^/- /' || :)