mirror of
https://github.com/lwouis/alt-tab-macos.git
synced 2026-05-24 11:20:36 +00:00
19 lines
569 B
Bash
Executable File
19 lines
569 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -exu
|
|
|
|
fileDirectory="resources/l10n"
|
|
stringsFile="$fileDirectory/Localizable.strings"
|
|
|
|
rm $stringsFile
|
|
# generate fresh Localizable.strings
|
|
find src -name '*.swift' | xargs genstrings -a -o $fileDirectory
|
|
# convert to utf8
|
|
echo "$(iconv -f UTF-16LE -t UTF-8 $stringsFile)" > $stringsFile
|
|
file $stringsFile
|
|
# remove the BOM if there is one to be deterministic; iconv may add a BOM or not, depending on the platform
|
|
mv $stringsFile $stringsFile.tmp
|
|
sed $'1s/\xef\xbb\xbf//' < $stringsFile.tmp > $stringsFile
|
|
rm $stringsFile.tmp
|
|
file $stringsFile
|