Fix the install script after the shellcheck "fixes"

(cherry picked from commit 6d28d4dfaf0632477321248cdb07b31fcb31ffb2)
This commit is contained in:
Nedyalko Andreev 2017-10-02 01:22:40 +03:00 committed by Marek Marczykowski-Górecki
parent 74ce135461
commit 42676bafb8
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -142,7 +142,8 @@ EOF
base=$(echo "$current_locale" | cut -f 1 -d .) base=$(echo "$current_locale" | cut -f 1 -d .)
charmap=$(echo "$current_locale.UTF-8" | cut -f 2 -d .) charmap=$(echo "$current_locale.UTF-8" | cut -f 2 -d .)
[ -n "$charmap" ] && charmap="-f $charmap" [ -n "$charmap" ] && charmap="-f $charmap"
localedef -i "$base" "$charmap" "$current_locale" # shellcheck disable=SC2086
localedef -i "$base" $charmap "$current_locale"
fi fi
} }
@ -180,7 +181,7 @@ unmask() {
preset_units() { preset_units() {
local represet= local represet=
while read -r action unit_name < "$1" while read -r action unit_name
do do
if [ "$action" = "#" ] && [ "$unit_name" = "Units below this line will be re-preset on package upgrade" ] if [ "$action" = "#" ] && [ "$unit_name" = "Units below this line will be re-preset on package upgrade" ]
then then
@ -210,7 +211,7 @@ preset_units() {
systemctl --no-reload preset "$unit_name" >/dev/null 2>&1 || : systemctl --no-reload preset "$unit_name" >/dev/null 2>&1 || :
fi fi
fi fi
done done < "$1"
} }
restore_units() { restore_units() {