mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-21 02:04:17 +00:00
all: avoid "==" bashism in scripts
This commit is contained in:
parent
611db44974
commit
e37a15acad
|
@ -1073,12 +1073,12 @@ AC_ARG_WITH(nmcli,
|
||||||
AS_HELP_STRING([--with-nmcli=yes|no], [Build nmcli]),
|
AS_HELP_STRING([--with-nmcli=yes|no], [Build nmcli]),
|
||||||
[],
|
[],
|
||||||
[with_nmcli=yes])
|
[with_nmcli=yes])
|
||||||
if test "$with_nmcli" == yes; then
|
if test "$with_nmcli" = yes; then
|
||||||
if test "$with_readline" = none; then
|
if test "$with_readline" = none; then
|
||||||
AC_MSG_FAILURE([nmcli requires readline library. Use --with-readline or --with-nmcli=no])
|
AC_MSG_FAILURE([nmcli requires readline library. Use --with-readline or --with-nmcli=no])
|
||||||
fi
|
fi
|
||||||
build_nmcli=yes
|
build_nmcli=yes
|
||||||
elif test "$with_nmcli" == no; then
|
elif test "$with_nmcli" = no; then
|
||||||
build_nmcli=no
|
build_nmcli=no
|
||||||
else
|
else
|
||||||
AC_MSG_ERROR([invalid --with-nmcli option. Valid options are --with-nmcli=yes|no])
|
AC_MSG_ERROR([invalid --with-nmcli option. Valid options are --with-nmcli=yes|no])
|
||||||
|
|
|
@ -56,7 +56,7 @@ in_set() {
|
||||||
local v="$1"
|
local v="$1"
|
||||||
shift
|
shift
|
||||||
for v2; do
|
for v2; do
|
||||||
test "$v" == "$v2" && return 0
|
test "$v" = "$v2" && return 0
|
||||||
done
|
done
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ in_set() {
|
||||||
local v="$1"
|
local v="$1"
|
||||||
shift
|
shift
|
||||||
for v2; do
|
for v2; do
|
||||||
test "$v" == "$v2" && return 0
|
test "$v" = "$v2" && return 0
|
||||||
done
|
done
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,7 @@ unset _WITH_VALGRIND_CHECKED
|
||||||
_with_valgrind() {
|
_with_valgrind() {
|
||||||
_is_true "$WITH_VALGRIND" 0 || return 1
|
_is_true "$WITH_VALGRIND" 0 || return 1
|
||||||
|
|
||||||
test "$_WITH_VALGRIND_CHECKED" == "1" && return 0
|
test "$_WITH_VALGRIND_CHECKED" = "1" && return 0
|
||||||
_WITH_VALGRIND_CHECKED=1
|
_WITH_VALGRIND_CHECKED=1
|
||||||
|
|
||||||
if [ "$IS_ALPINE" = 1 ]; then
|
if [ "$IS_ALPINE" = 1 ]; then
|
||||||
|
|
|
@ -62,7 +62,7 @@ git_config_reset() {
|
||||||
local val="$2"
|
local val="$2"
|
||||||
local c=(git config --replace-all "$key" "$val")
|
local c=(git config --replace-all "$key" "$val")
|
||||||
|
|
||||||
test "$#" == 2 || die "invalid arguments to git_config_add(): $@"
|
test "$#" -eq 2 || die "invalid arguments to git_config_add(): $@"
|
||||||
|
|
||||||
if [ "$(git config --get-all "$key")" = "$val" ]; then
|
if [ "$(git config --get-all "$key")" = "$val" ]; then
|
||||||
SKIP=1 call "${c[@]}"
|
SKIP=1 call "${c[@]}"
|
||||||
|
@ -76,7 +76,7 @@ git_config_add() {
|
||||||
local val="$2"
|
local val="$2"
|
||||||
local c=(git config --add "$key" "$val")
|
local c=(git config --add "$key" "$val")
|
||||||
|
|
||||||
test "$#" == 2 || die "invalid arguments to git_config_add(): $@"
|
test "$#" -eq 2 || die "invalid arguments to git_config_add(): $@"
|
||||||
|
|
||||||
if git config --get-all "$key" | grep -qFx "$val"; then
|
if git config --get-all "$key" | grep -qFx "$val"; then
|
||||||
SKIP=1 call "${c[@]}"
|
SKIP=1 call "${c[@]}"
|
||||||
|
|
|
@ -39,7 +39,7 @@ libnm_headers() {
|
||||||
|
|
||||||
SOURCEDIR="$1"
|
SOURCEDIR="$1"
|
||||||
BUILDDIR="$2"
|
BUILDDIR="$2"
|
||||||
if test "$SOURCEDIR" == "$BUILDDIR"; then
|
if test "$SOURCEDIR" = "$BUILDDIR"; then
|
||||||
BUILDDIR=
|
BUILDDIR=
|
||||||
fi
|
fi
|
||||||
[ -z "$SOURCEDIR" ] && SOURCEDIR='.'
|
[ -z "$SOURCEDIR" ] && SOURCEDIR='.'
|
||||||
|
|
Loading…
Reference in a new issue