Gimp/build/windows/installer/lang/extractlang.sh
Félix Piédallu 65eff6f150 Meson port.
2019-09-11 16:42:04 +02:00

11 lines
237 B
Bash

#!/bin/bash
prefix=$1
encoding=$2
infile=$3
#replace [] with \[\]
prefix=$(echo "$prefix" | sed 's/[][]/\\\0/g')
#echo to stdout
sed '/^\w\+'"$prefix"'=/{s/\(.\)'"$prefix"'/\1/;n};/^\w.*=/d' "$infile" \
| iconv -f UTF-8 -t "$encoding"