#!/bin/bash # # I got tired of editing the SWF.csproj # This script will generate it from our System.Windows.Forms.dll.sources # # tr=tr OutFile=SWF.csproj Source=System.Windows.Forms.dll.sources Resource=System.Windows.Forms.dll.resources SWFhead() { cat << EOT EOT } SWFfilelist() { cat $Source | while read SRC; do # Don't do AssemblyInfo, it's got signing requests and such that we don't want if [ "x$SRC" != "xAssembly/AssemblyInfo.cs" ] ; then SRC=`echo $SRC | $tr '/' '\\\\'` cat << EOT EOT fi done } SWFresourcelist() { cat $Resource | while read SRC; do SRC=`echo $SRC | $tr '/' '\\\\'` SRC=`echo $SRC | sed 's/-resource://' | gawk -F , '{print " RelPath = \"" $1 "\"\n CustomToolNameSpace = \"" $2 "\""}' | fgrep -v \"\"` cat << EOT EOT done } SWFtail() { cat << EOT EOT } SWFhead > $OutFile SWFfilelist >> $OutFile SWFresourcelist >> $OutFile SWFtail >> $OutFile