Just copy (and cleanup) from workspace instead of doing an export from CVS

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-03-20 00:38:05 +00:00
parent 544f6e1665
commit a568802deb

View File

@@ -13,8 +13,10 @@ fi
#---------------------------------------------------------------------- #----------------------------------------------------------------------
# Initialization # Initialization
distdir=`pwd`/dist wxpdir=`pwd`
builddir=`pwd`/_build_rpm wxdir=${wxpdir}/..
distdir=${wxpdir}/dist
builddir=${wxpdir}/_build_rpm
rpmtop=${builddir}/rpmtop rpmtop=${builddir}/rpmtop
cvsroot=:pserver:anoncvs@cvs.wxwindows.org:/pack/cvsroots/wxwindows cvsroot=:pserver:anoncvs@cvs.wxwindows.org:/pack/cvsroots/wxwindows
pythonbin=/usr/bin/python pythonbin=/usr/bin/python
@@ -28,14 +30,13 @@ rpmflag=-ba
# Check parameters # Check parameters
function useage { function useage {
echo "Usage: $0 cvs_tag wx_version py_version [command flags...]" echo "Usage: $0 wx_version py_version [command flags...]"
echo " cvs_tag Tag to use for CVS export"
echo " wx_version String to use for version in filenames, etc." echo " wx_version String to use for version in filenames, etc."
echo " py_version String to append to $pythonbin (which python" echo " py_version String to append to $pythonbin (which python"
echo " version to use.)" echo " version to use.)"
echo "" echo ""
echo "command flags:" echo "command flags:"
echo " skipcvs Don't do the CVS export" echo " skipcopy Don't copy the files for the tarball from the workspace"
echo " skiptar Don't build the tarball" echo " skiptar Don't build the tarball"
echo " skiprpm Don't build the RPM (but why?)" echo " skiprpm Don't build the RPM (but why?)"
echo " skipclean Don't do the cleanup at the end" echo " skipclean Don't do the cleanup at the end"
@@ -46,20 +47,18 @@ function useage {
# echo " smp Add SMP=2 to the envivonment to speed wxGTK build" # echo " smp Add SMP=2 to the envivonment to speed wxGTK build"
} }
if [ $# -lt 3 ]; then if [ $# -lt 2 ]; then
useage useage
exit 1 exit 1
fi fi
cvs_tag=$1 version=$1
version=$2 pyver=$2
pyver=$3 shift;shift
shift;shift;shift
ver2=`echo ${version} | cut -c 1,2,3` ver2=`echo ${version} | cut -c 1,2,3`
tarver=${tarname}-${version} tarver=${tarname}-${version}
python=${pythonbin}${pyver} python=${pythonbin}${pyver}
if [ ! -e ${python} ]; then if [ ! -e ${python} ]; then
echo "${python} not found!" echo "${python} not found!"
@@ -85,7 +84,7 @@ function makespec {
for flag in $*; do for flag in $*; do
case ${flag} in case ${flag} in
skipcvs) skipcvs=1 ;; skipcopy) skipcopy=1 ;;
skipclean) skipclean=1 ;; skipclean) skipclean=1 ;;
skiptar) skiptar=1 ;; skiptar) skiptar=1 ;;
skiprpm) skiprpm=1 ;; skiprpm) skiprpm=1 ;;
@@ -123,39 +122,46 @@ done
#---------------------------------------------------------------------- #----------------------------------------------------------------------
# Get the sources from CVS # Copy the sources from my CVS workspace
if [ -z "${skipcvs}" ]; then if [ -z "${skipcopy}" ]; then
echo "*** Exporting CVS archive..." echo "*** Copying CVS tree"
pushd ${builddir} > /dev/null pushd ${builddir} > /dev/null
if [ -e ${tarver} ]; then if [ -e ${tarver} ]; then
rm -rf ${tarver} rm -rf ${tarver}
fi fi
echo cvs -d ${cvsroot} export -r ${cvs_tag} -d ${tarver} wxWindows mkdir -p ${tarver}
cvs -d ${cvsroot} export -r ${cvs_tag} -d ${tarver} wxWindows > /dev/null 2>&1
if [ "$?" != "0" ]; then
echo "*** CVS failure, exiting."
exit 1
fi
echo "*** Removing uneeded stuff from CVS tree" # copy root dir contents
cp -pf --link ${wxdir}/* ${tarver} > /dev/null 2>&1
# copy all top dirs except CVS, build, demos, utils, and wxPython
for d in art contrib debian distrib docs include lib locale misc samples src; do
cp -Rpf --link ${wxdir}/$d ${tarver} #> /dev/null 2>&1
done
# now do the same thing for wxPython, skipping it's build dirs and such
mkdir ${tarver}/wxPython
cp -pf --link ${wxdir}/wxPython/* ${tarver}/wxPython > /dev/null 2>&1
for d in contrib demo distrib distutils samples scripts src wxPython; do
cp -Rpf --link ${wxdir}/wxPython/$d ${tarver}/wxPython #> /dev/null 2>&1
done
echo "*** Removing uneeded stuff from copy of CVS tree"
pushd ${tarver} > /dev/null pushd ${tarver} > /dev/null
rm `find . -name .cvsignore` rm `find . -name .cvsignore`
rm -rf `find . -name CVS`
rm *.spec rm *.spec
rm -rf demos
# rm -rf docs
rm -rf docs/html rm -rf docs/html
rm -rf docs/latex rm -rf docs/latex
rm -rf samples rm locale/*.mo
rm -rf utils rm -f wxPython/wxPython/* > /dev/null 2>&1
# rm -rf include/wx/mgl rm `find . -name ".#*"`
# rm -rf include/wx/motif rm `find . -name "*~"`
# rm -rf include/wx/os2 rm `find . -name "*.pyc"`
# rm -rf src/mgl rm `find . -name "core*"`
# rm -rf src/motif rm wxPython/demo/.setup.sh
# rm -rf src/os2
rm -rf wxPython/wxSWIG
rm -rf wxPython/tests
popd > /dev/null popd > /dev/null
popd > /dev/null popd > /dev/null