mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-04 18:38:01 -05:00
pkgdelta: proper quoting in [[ expression ]]
Always quote the right-hand side of expression when the == or != operator is used, unless intended as a pattern. Signed-off-by: lolilolicon <lolilolicon@gmail.com>
This commit is contained in:
parent
497501d1c7
commit
775b94e649
@ -93,17 +93,17 @@ create_xdelta()
|
|||||||
newver="$pkgver"
|
newver="$pkgver"
|
||||||
newarch="$arch"
|
newarch="$arch"
|
||||||
|
|
||||||
if [[ $oldname != $newname ]]; then
|
if [[ $oldname != "$newname" ]]; then
|
||||||
error "$(gettext "The package names don't match : '%s' and '%s'")" "$oldname" "$newname"
|
error "$(gettext "The package names don't match : '%s' and '%s'")" "$oldname" "$newname"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $oldarch != $newarch ]]; then
|
if [[ $oldarch != "$newarch" ]]; then
|
||||||
error "$(gettext "The package architectures don't match : '%s' and '%s'")" "$oldarch" "$newarch"
|
error "$(gettext "The package architectures don't match : '%s' and '%s'")" "$oldarch" "$newarch"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $oldver == $newver ]]; then
|
if [[ $oldver == "$newver" ]]; then
|
||||||
error "$(gettext "Both packages have the same version : '%s'")" "$newver"
|
error "$(gettext "Both packages have the same version : '%s'")" "$newver"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user