Summary Files Commits Branches @commit @diff @stats
path: root / generate-hooks / make-flags.sh
blob: 84adfaf83268a748c66793264ee191fd2a474a7c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

# Adds a way to more simply insert flags into text
# Each flag is represented with an ftag (text that is preceded by &&)

# Available flags:
# Great Britain - &&gb

if [ -z "$1" ]; then
	echo First parameter must be string with file paths
	exit
fi

awkloc="$(dirname "$0")/create-flags.awk"

for file in $1; do
	awk -f "$awkloc" $file > tmp && mv -f tmp $file
done