Skip to content

Commit

Permalink
udev: use printf for hex conversion
Browse files Browse the repository at this point in the history
Ubuntu 24.04 comes with a version of original-awk that no longer accepts
hexadecimal values [1], pipe the field to printf instead.

[1] https://github.com/onetrueawk/awk/blob/5c261eb19a5e92bb6d68e818cf575524067c1e6a/awk.1#L626-L628
  • Loading branch information
LDVG authored and kongeo committed Oct 8, 2024
1 parent 9669643 commit c4ba104
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions udev/check.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/sh -u

# Copyright (c) 2020 Yubico AB. All rights reserved.
# Copyright (c) 2020-2024 Yubico AB. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# SPDX-License-Identifier: BSD-2-Clause

sort_by_id() {
awk '{ printf "%d\n", $3 }' | sort -Cnu
awk '{ printf "%s\n", $3 }' | xargs printf '%d\n' | sort -Cnu
}

if ! grep '^vendor' "$1" | sort_by_id; then
Expand Down

0 comments on commit c4ba104

Please sign in to comment.