From 62daf522a1e51c4a1d9d8b31d2a0093da86ebc5d Mon Sep 17 00:00:00 2001 From: Syndamia Date: Wed, 28 Sep 2022 17:15:36 +0300 Subject: [hooks] Reworked all hooks to use awk for their logic --- generate-hooks/make-flags.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'generate-hooks/make-flags.sh') 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 "ENG" - sed -i 's/&&gb/ENG/g' "$file" + awk -f "$awkloc" $file > tmp && mv -f tmp $file done -- cgit v1.3.1-26-gb76a