git subrepo clone git@github.com:compihu/platform-test-f4-ll.git platforms/platform-test-f4-ll
subrepo: subdir: "platforms/platform-test-f4-ll" merged: "bc41134" upstream: origin: "git@github.com:compihu/platform-test-f4-ll.git" branch: "master" commit: "bc41134" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo" commit: "87ee373"
This commit is contained in:
parent
46ce55c6a0
commit
95af4ce0d8
460 changed files with 84105 additions and 0 deletions
35
platforms/platform-test-f4-ll/cpputest/scripts/NewLibrary.sh
Executable file
35
platforms/platform-test-f4-ll/cpputest/scripts/NewLibrary.sh
Executable file
|
@ -0,0 +1,35 @@
|
|||
#!/bin/bash -x
|
||||
TEMPLATE_DIR=${CPPUTEST_HOME}/scripts/templates
|
||||
LIBRARY=$1
|
||||
|
||||
if [ -e ${LIBRARY} ] ; then
|
||||
echo "The directory ${LIBRARY} already exists"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
echo "Copy template project to ${LIBRARY}"
|
||||
cp -R ${TEMPLATE_DIR}/ProjectTemplate/Project ${LIBRARY}
|
||||
find ${LIBRARY} -name \.svn | xargs rm -rf
|
||||
|
||||
echo "Update to the new LIBRARY name"
|
||||
substituteProjectName="-e s/Project/${LIBRARY}/g -i .bak"
|
||||
|
||||
cd ${LIBRARY}
|
||||
|
||||
sed ${substituteProjectName} *.*
|
||||
sed ${substituteProjectName} Makefile
|
||||
|
||||
for name in BuildTime.h BuildTime.cpp BuildTimeTest.cpp ; do
|
||||
mv Project${name} ${LIBRARY}${name}
|
||||
done
|
||||
|
||||
cd ..
|
||||
|
||||
sed -e "s/DIRS = /DIRS = ${LIBRARY} /g" -i .bak Makefile
|
||||
|
||||
find ${LIBRARY} -name \*.bak | xargs rm -f
|
||||
|
||||
echo "#include \"../${LIBRARY}/AllTests.h\"" >> AllTests/AllTests.cpp
|
||||
|
||||
echo "You have to manually add the library reference to the AllTests Makefile"
|
||||
echo "and maybe change the order of the library builds in the main Makefile"
|
Loading…
Add table
Add a link
Reference in a new issue