diff options
author | dteske <dteske@FreeBSD.org> | 2016-01-27 00:09:53 +0000 |
---|---|---|
committer | dteske <dteske@FreeBSD.org> | 2016-01-27 00:09:53 +0000 |
commit | ebabb0bf02ef0ad6a3725ca2d8250f678285d943 (patch) | |
tree | 041625ce694cdfeda9357510f31387409d35a1c9 /usr.sbin/bsdconfig | |
parent | 51896ff64b61a7a87ec30d4615aa9e9a83179955 (diff) | |
download | FreeBSD-src-ebabb0bf02ef0ad6a3725ca2d8250f678285d943.zip FreeBSD-src-ebabb0bf02ef0ad6a3725ca2d8250f678285d943.tar.gz |
Fix ABI parsing
Diffstat (limited to 'usr.sbin/bsdconfig')
-rw-r--r-- | usr.sbin/bsdconfig/share/packages/musthavepkg.subr | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/bsdconfig/share/packages/musthavepkg.subr b/usr.sbin/bsdconfig/share/packages/musthavepkg.subr index 929823e..b336d26 100644 --- a/usr.sbin/bsdconfig/share/packages/musthavepkg.subr +++ b/usr.sbin/bsdconfig/share/packages/musthavepkg.subr @@ -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" |