[BACK]Return to plist_to_c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / tests / lib / libppath

File: [cvs.NetBSD.org] / src / tests / lib / libppath / plist_to_c (download)

Revision 1.1.4.1, Fri Apr 6 17:02:09 2012 UTC (9 years ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Changes since 1.1: +1 -1 lines

Pull up following revision(s) (requested by joerg in ticket #147):
	tests/lib/libppath/Makefile: revision 1.4
	external/mit/xorg/server/xorg-server/hw/xfree86/loader/Makefile: revision 1.11
	external/mit/xorg/server/xorg-server/hw/xfree86/loader/Makefile: revision 1.12
	tests/lib/libppath/plist_to_c: revision 1.2
Use :Q for quoting. Execute shell script using the host shell.
Use :Q for quoting. Execute shell script using the host shell.
Use toolchain awk to make them buildable on Solaris 10.

#!/bin/sh

prog=$(basename $0)
usage()
{
	echo "usage: ${prog} symbol" 1>&2
	exit 1
}

if [ $# -ne 1 ]; then
	usage
fi

sed 's/\(["\]\)/\\\1/g' | \
${AWK:-awk} -v sym=$1 '
BEGIN	{ printf "const char " sym "[] = \""; }
	{ printf $0 "\\n"; }
END	{ print "\";"; }'

exit 0