#
# The command line must have the following parameters:
#
-# 1. the path to the base of the wx source tree
-# 2. the path of where to put the resulting RPMs
-# 3. skipclean flag (yes|no)
-# 4. the VERSION
-# 5. the remaining args are the versions of Python to build for
+# 1. the path of the build dir. The src RPMs will be here when we start
+# and the binary RPMs will be left here when we're done.
+# 2. skipclean flag (yes|no)
+# 3. the VERSION
+# 4. the remaining args are the versions of Python to build for
#
# ---------------------------------------------------------------------------
exit 1
fi
-WXDIR=$1
-DESTDIR=$2
-SKIPCLEAN=$3
-VERSION=$4
-shift;shift;shift;shift
+DESTDIR=$1
+SKIPCLEAN=$2
+VERSION=$3
+shift;shift;shift
PYVER=$@
# Since this is probably a VMWare guest, make sure that the date and
ntpdate gate.alldunn.com
-# In this case $WXDIR is where we will build at, but the source tree
-# won't be there like the other builds. The source RPMs will be in
-# $DESTDIR, and we'll put the binary RPMs back there when done.
-
-echo "Preparing $WXDIR..."
-mkdir -p $WXDIR
-cd $WXDIR
-rm -rf *
+cd $DESTDIR
for ver in $PYVER; do
echo "Building the RPMs for Python $ver..."
- myrpmbuild --rebuild $DESTDIR/wxPythonGTK-py$ver-$VERSION-1.src.rpm
- myrpmbuild --rebuild $DESTDIR/wxPythonGTK2-py$ver-$VERSION-1.src.rpm
+ myrpmbuild --rebuild wxPythonGTK-py$ver-$VERSION-1.src.rpm
+ myrpmbuild --rebuild wxPythonGTK2-py$ver-$VERSION-1.src.rpm
done
if [ $SKIPCLEAN != yes ]; then
echo "Cleaning up..."
- rm -rf $WXDIR
+ for ver in $PYVER; do
+ rm wxPythonGTK-py$ver-$VERSION-1.src.rpm
+ done
fi
echo "-=-=-=- Goodbye! -=-=-=-"