Fix ABI parsing
This commit is contained in:
parent
938443fdf6
commit
c4ba688294
@ -1,6 +1,6 @@
|
||||
if [ ! "$_PACKAGES_MUSTHAVEPKG_SUBR" ]; then _PACKAGES_MUSTHAVEPKG_SUBR=1
|
||||
#
|
||||
# Copyright (c) 2014 Devin Teske
|
||||
# Copyright (c) 2014-2016 Devin Teske
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@ -45,7 +45,11 @@ f_include $BSDCFG_SHARE/mustberoot.subr
|
||||
f_musthavepkg_init()
|
||||
{
|
||||
local funcname=f_musthavepkg_init
|
||||
local pkg_abi_awk='$1~/^ABI/{print $NF; exit}'
|
||||
local pkg_abi_awk=' # BEGIN-AWK
|
||||
$1 ~ /^ABI/ && $0 = $NF, sub(/^"/, "") && sub(/".*/, "") {
|
||||
print; found = 1; exit
|
||||
} END { exit ! found }
|
||||
' # END-AWK
|
||||
|
||||
if [ "$PKG_ABI" ]; then # Already set
|
||||
f_dprintf "PKG_ABI=[%s]" "$PKG_ABI"
|
||||
|
Loading…
Reference in New Issue
Block a user