diff options
[hooks] Reworked all hooks to use awk for their logic
1 files changed, 3 insertions, 2 deletions
| -rwxr-xr-x | generate-hooks/make-flags.sh | 5 |
diff --git a/generate-hooks/make-flags.sh b/generate-hooks/make-flags.sh index 69d8952..84adfaf 100755 --- a/generate-hooks/make-flags.sh +++ b/generate-hooks/make-flags.sh @@ -11,7 +11,8 @@ if [ -z "$1" ]; then exit fi +awkloc="$(dirname "$0")/create-flags.awk" + for file in $1; do - # Replaces "&&gb" with "<img src="/img/gb.svg" class="unzoomable" alt="ENG" title="ENG">" - sed -i 's/&&gb/<img src="\/img\/gb.svg" class="unzoomable" alt="ENG" title="ENG">/g' "$file" + awk -f "$awkloc" $file > tmp && mv -f tmp $file done |