diff options
[hooks] Reworked all hooks to use awk for their logic
1 files changed, 3 insertions, 7 deletions
| -rwxr-xr-x | generate-hooks/make-file-lists.sh | 10 |
diff --git a/generate-hooks/make-file-lists.sh b/generate-hooks/make-file-lists.sh index e407e19..87d8e61 100755 --- a/generate-hooks/make-file-lists.sh +++ b/generate-hooks/make-file-lists.sh @@ -53,12 +53,8 @@ if [ -z "$1" ]; then exit fi +awkloc="$(dirname "$0")/create-file-lists.awk" + for file in $1; do - sed -i 's/&&nos$/<table class="file-list"><tr>/g; - s/^<p>&&fos$/<details class="file-wrapper"><summary>/g; - s/^&&fs0$/<\/summary><table class="file-list"><tr>/g; - s/^&&fs$/<\/tr><tr>/g; - s/^&&nod<\/p>$/<\/tr><\/table>/g; - s/^&&fod<\/p>$/<\/tr><\/table><\/details>/g' \ - "$file" + awk -f "$awkloc" $file > tmp && mv -f tmp $file done |