Suggest you have a multi-program project using our usual schema and want to add a new program prog2
with similar build scheme as prog1
.
First set some helper variables to be able to use the loops below:
PROG="prog1" NEWPROG="prog2"
Then create the directories:
PROG="prog1" NEWPROG="prog2" for A in unix mingx do for B in debug release do mkdir -pv build/$A/$B/programs/${PROG}/ done done
You also might want to copy Makefiles:
PROG="prog1" NEWPROG="prog2" for A in unix mingx do for B in debug release do cat build/$A/$B/programs/${PROG}/Makefile |sed -e "s/${PROG}/${NEWPROG}/g" >build/$A/$B/programs/${NEWPROG}/Makefile done done
Finally You might want to svn add
the new directories and copy the svn properties, especially svn:ignore
, like this:
for A in unix mingx do for B in debug release do svn add build/$A/$B/programs/${NEWPROG} svn propget svn:ignore build/$A/$B/programs/${PROG} |sed -e "s/${PROG}/${NEWPROG}/g" >/tmp/svn.props svn propset svn:ignore build/$A/$B/programs/${NEWPROG} --file /tmp/svn.props done done