Summary Files Commits Branches @commit @diff @stats
path: root / generate-hooks / make-flags.sh
blob: 69d895295a5b7388f066b490d8983935bdbc1f6f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/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

for file in $1; do
	# Replaces "&&gb" with "<img src="/img/gb.svg" class="unzoomable" alt="ENG" title="ENG">"
	sed -i 's/&#38;&#38;gb/<img src="\/img\/gb.svg" class="unzoomable" alt="ENG" title="ENG">/g' "$file"
done