svn commit: r294865 - head/usr.sbin/bsdconfig/share/packages
Devin Teske
dteske at FreeBSD.org
Wed Jan 27 00:09:54 UTC 2016
Author: dteske
Date: Wed Jan 27 00:09:53 2016
New Revision: 294865
URL: https://svnweb.freebsd.org/changeset/base/294865
Log:
Fix ABI parsing
Modified:
head/usr.sbin/bsdconfig/share/packages/musthavepkg.subr
Modified: head/usr.sbin/bsdconfig/share/packages/musthavepkg.subr
==============================================================================
--- head/usr.sbin/bsdconfig/share/packages/musthavepkg.subr Wed Jan 27 00:08:23 2016 (r294864)
+++ head/usr.sbin/bsdconfig/share/packages/musthavepkg.subr Wed Jan 27 00:09:53 2016 (r294865)
@@ -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"
More information about the svn-src-all
mailing list