#!/bin/sh
tools_wrapper_sed=/usr/bin/sed
shquote()
{
	shquoted=$1
	case $shquoted in
	*\'*)
		# replace each ' with '\''
		shquoted=`$tools_wrapper_sed -e "s,','\\\\\\\\'',g" <<EOF
$shquoted
EOF`
	esac
	case $shquoted in
	(*[!!%+,\-./0-9:=@A-Z_a-z]*|'')
		# Move the single quote after the first equals sign, so that
		# macro definitions look like -DMACRO='"value"' instead of
		# the less common '-DMACRO="value"'.
		case $shquoted in
		(*=*)	lhs=${shquoted%%=*}
			case $lhs in
			(*[!!%+,\-./0-9:=@A-Z_a-z]*|'') ;;
			(*)	shquoted="$lhs='${shquoted#*=}'"
				return
			esac
		esac
		shquoted="'$shquoted'"
	esac
}
shquote_args() {
	shquoted_args=''
	for arg in "$@"; do
		shquote "$arg"
		shquoted_args="$shquoted_args $shquoted"
	done
}
wrapperlog="${TOOLS_WRAPPER_LOG-/usr/pkgsrc/packages/bulklog/earmv6hf/openwbem-3.2.2nb7/work.log}"
shquote_args "$@"
echo "[*] "/tmp/pkgbuild/net/openwbem/work.earmv6hf/.tools/bin/strip-dbg"$shquoted_args" >> $wrapperlog
logprefix=
logmain=/usr/bin/strip" "-g
echo '<.>' "$logprefix$logmain$shquoted_args" >> $wrapperlog
/usr/bin/strip -g "$@"
