[type/__update_alternatives] Fix for non-English locales
Since update-alternatives(1) is localized, screen scraping its output breaks if the locale is set to non-English.
This commit is contained in:
parent
0b3b47396f
commit
bbcc81a984
2 changed files with 5 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
update-alternatives --display "${__object_id:?}" 2>/dev/null \
|
LC_ALL=C update-alternatives --display "${__object_id:?}" 2>/dev/null \
|
||||||
| awk -F ' - ' '/priority [0-9]+$/ { print $1 }'
|
| awk -F ' - ' '/priority [0-9]+$/ { print $1 }'
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
path_is="$( update-alternatives --display "${__object_id:?}" 2>/dev/null \
|
path_is=$(
|
||||||
| awk '/link currently points to/ {print $5}' )"
|
LC_ALL=C update-alternatives --display "${__object_id?}" 2>/dev/null \
|
||||||
|
| awk '/link currently points to/ { print $5 }')
|
||||||
|
|
||||||
if [ -z "$path_is" ] && [ -z "${__cdist_dry_run+dry run}" ]
|
if [ -z "$path_is" ] && [ -z "${__cdist_dry_run+dry run}" ]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in a new issue