From d9db7edd435c3280e6ec8c2f5f9ea534fb856771 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Bollo?= Date: Mon, 30 Mar 2015 16:44:41 +0200 Subject: [PATCH] Improvement of vconftool/buxton_ensure_group MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This will now allow users that don't has right to write the label but that has the right to read it to be able to run the script when the label of the group is already set to the expected value. May solve the bug TT-51. Change-Id: I867e787f7dc0dfea6c8838be71c3cb41d0505cf8 Signed-off-by: José Bollo --- src/vconf-buxton-tool.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vconf-buxton-tool.sh b/src/vconf-buxton-tool.sh index b864842..de96da6 100755 --- a/src/vconf-buxton-tool.sh +++ b/src/vconf-buxton-tool.sh @@ -160,7 +160,12 @@ buxton_ensure_group() { else buxton_make_group "$layer" "$group" || return fi - [[ -z "$label" ]] || buxton_set_label "$layer" "$group" "$label" + if [[ -n "$label" ]] && [[ "$label" != "$(buxton_get_label "$layer" "$group")" ]] + then + buxton_set_label "$layer" "$group" "$label" + else + info "group $group in layer $layer already has label $label" + fi } buxton_ensure_ready() { -- 2.7.4