All pastes #282566 Raw Edit

Something

public text v1 · immutable
#282566 ·published 2006-12-17 18:15 UTC
rendered paste body
SWFresourcelist()
{
echo "  <ItemGroup>"
    cat $Resource | while read SRC; do
	CUSTOMTOOLNAMESPACE=""

	# strip out that -resource:
	SRC=`echo $SRC | sed 's/-resource://'`

	CUSTOMTOOLNAMESPACE=`echo $SRC | gawk -F, '{print $2}'`

	INCLUDE=`echo $SRC | gawk -F, '{print $1}'`

	if test -f $INCLUDE.prebuilt; then
	    INCLUDE=$INCLUDE.prebuilt
	fi

	# convert all /'s to \\'s
	INCLUDE=`echo $INCLUDE | tr '/' '\\\\'`

	# strip off the path from the name of the resource
	LOGICALNAME=`echo $INCLUDE | sed 's/resources\\\\//' | sed 's/.prebuilt//'`

	echo "    <EmbeddedResource Include=\"$INCLUDE\">"
	echo "      <LogicalName>$LOGICALNAME</LogicalName>"
	if test "x$CUSTOMTOOLNAMESPACE" != "x"; then
	    echo "      <CustomToolNameSpace>$CUSTOMTOOLNAMESPACE</CustomToolNameSpace>"
	fi
	echo "    </EmbeddedResource>"
    done
echo "  </ItemGroup>"
}