Skip to content

Commit

Permalink
Use short options for cmp
Browse files Browse the repository at this point in the history
In order to be consistent with other uses of cmp and to improve compatiblity
with other implementations, like busybox one, change long options to short
ones.

Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
  • Loading branch information
wlozano0collabora committed Nov 26, 2021
1 parent 2662f6f commit e7511e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmdline/apt-key.in
Original file line number Diff line number Diff line change
Expand Up @@ -314,11 +314,11 @@ is_supported_keyring() {
local FILEEXT="${1##*.}"
if [ "$FILEEXT" = 'gpg' ]; then
# 0x98, 0x99 and 0xC6 via octal as hex isn't supported by dashs printf
if printf '\231' | cmp --silent --bytes=1 - "$1"; then
if printf '\231' | cmp -s -n 1 - "$1"; then
true
elif printf '\230' | cmp --silent --bytes=1 - "$1"; then
elif printf '\230' | cmp -s -n 1 - "$1"; then
true
elif printf '\306' | cmp --silent --bytes=1 - "$1"; then
elif printf '\306' | cmp -s -n 1 - "$1"; then
true
else
apt_warn "The key(s) in the keyring $1 are ignored as the file has an unsupported filetype."
Expand Down

0 comments on commit e7511e1

Please sign in to comment.