--- /dev/null
+BUILD_DIR=/usr/src/redhat/
+PWD=`pwd`
+UPLOAD_PATH=/home/ftp/pub
+UPLOAD_HOST=flurry
+UPLOAD_DIR=`basename $PWD`
+UPLOAD_URI=${UPLOAD_HOST}:${UPLOAD_PATH}/${UPLOAD_DIR}
+DISTRO="centos/5.5"
+project=`basename $PWD`
+if test ! -f ${project}.spec; then
+ echo "Missing ${project}.spec file. Are you in the project directory?"
+ exit 1
+fi
+if test ! -x /bin/rpm; then
+ echo "$0: /bin/rpm missing. Install rpm"
+ exit 1
+fi
+pkg_names=`rpm -q --specfile ${project}.spec`
+inc_src=true
+if test ! -d ${BUILD_DIR}/SRPMS; then
+ echo "No SRPMS dir under ${BUILD_DIR}"
+ inc_src=false
+fi
+inc_bin=true
+if test ! -d ${BUILD_DIR}/RPMS; then
+ echo "No RPMS dir under ${BUILD_DIR}"
+ inc_bin=false
+fi
+
+for pkg in ${pkg_names}; do
+ if $inc_src; then
+ if test ! -f ${BUILD_DIR}/SRPMS/${pkg}.src.rpm; then
+ echo "No SRPM for ${pkg}"
+ else
+ scp ${BUILD_DIR}/SRPMS/${pkg}.src.rpm ${UPLOAD_URI}/redhat/${DISTRO}/SRPMS/
+ fi
+ fi
+ if $inc_bin; then
+ for dir in ${BUILD_DIR}/RPMS/*; do
+ arch=`basename ${dir}`
+ if test -f ${dir}/${pkg}.${arch}.rpm; then
+ scp ${dir}/${pkg}.${arch}.rpm ${UPLOAD_URI}/redhat/${DISTRO}/RPMS/${arch}/
+ else
+ echo "No ${pkg} in arch ${arch}"
+ fi
+ done
+ fi
+done