mirror of
https://github.com/fairyglade/ly.git
synced 2025-12-21 03:34:54 +00:00
remove necessity for temp file
This commit is contained in:
@@ -4,7 +4,6 @@ set -eu
|
|||||||
|
|
||||||
function process_lang_file() {
|
function process_lang_file() {
|
||||||
local input_file=$1
|
local input_file=$1
|
||||||
local tmp_file=$(mktemp)
|
|
||||||
local -A lang_strings_in_file
|
local -A lang_strings_in_file
|
||||||
|
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
@@ -26,9 +25,7 @@ function process_lang_file() {
|
|||||||
printf "\n"
|
printf "\n"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
} > $tmp_file
|
} > "$input_file"
|
||||||
|
|
||||||
mv "$tmp_file" "$input_file"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LANG_DIR=$(dirname "$(realpath $0)")
|
LANG_DIR=$(dirname "$(realpath $0)")
|
||||||
|
|||||||
Reference in New Issue
Block a user