14 řádky
536 B
Bash
Executable File
14 řádky
536 B
Bash
Executable File
#!/bin/bash
|
|
|
|
prepare() {
|
|
FILENAME=$(basename ${1})
|
|
perl -lne 'print for /(<%@ .*? %>)/g;' ${1} | uniq | awk '{sub($1,"",$0); sub(/^ */,"msgid \"",$0); sub($NF"$","",$0); sub(/ *$/,"\"\nmsgstr \"\"\n",$0); print}' | head -n-1 > ./files/usr/lib/kagera/langs/TEMPLATE/${FILENAME%%.*}.dic
|
|
}
|
|
|
|
mkdir -p ./files/usr/lib/kagera/langs/TEMPLATE
|
|
|
|
while read FILE; do
|
|
prepare ${FILE}
|
|
done < <(find ./files/ -type f -name \*.cbsi -o -name \*.sh)
|
|
mv ./files/usr/lib/kagera/langs/TEMPLATE/index.dic ./files/usr/lib/kagera/langs/TEMPLATE/common.dic
|