From b739247ff71bf95964e0ae9370bfa9ce05b0c5de0493cd440292e51ec458768f Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Tue, 6 Nov 2018 15:27:56 +0000 Subject: [PATCH] - Use only the basename of the keytable - Use a multi-line compatible sed expression for replacement OBS-URL: https://build.opensuse.org/package/show/system:install:head/live-langset-data?expand=0&rev=19 --- langset.sh | 7 +++++-- live-langset-data.changes | 6 ++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/langset.sh b/langset.sh index eb80536..4122f46 100644 --- a/langset.sh +++ b/langset.sh @@ -35,14 +35,17 @@ fi # Read all values of the langset data files . "$file" +# Chop the extension off +KEYTABLE="${KEYTABLE%%.map*}" + # Apply all options [ -n "$RC_LC_MESSAGES" ] || RC_LC_MESSAGES=$RC_LANG [ -z "$RC_LANG" ] || localectl set-locale LANG=$RC_LANG LC_MESSAGES=$RC_LC_MESSAGES # set_vconsole_option KEY value set_vconsole_option() { - # "t;q1" means that this sed command exits with 1 if no substitution was done - sed -i"" -E "s/^$1=.+\$/$1=$2/g;t;q1" /etc/vconsole.conf && return + # This sed command exits with 1 if no substitution was done + sed -i"" -E "/^$1=.*\$/,\${s//$1=$2/;b};\$q1" /etc/vconsole.conf && return echo "$1=$2" >> /etc/vconsole.conf } diff --git a/live-langset-data.changes b/live-langset-data.changes index e582887..f46414b 100644 --- a/live-langset-data.changes +++ b/live-langset-data.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Nov 6 15:23:41 UTC 2018 - Fabian Vogt + +- Use only the basename of the keytable +- Use a multi-line compatible sed expression for replacement + ------------------------------------------------------------------- Wed Oct 31 09:19:22 UTC 2018 - Fabian Vogt