5 if [ -z "$1" -o -z "$2" -o -z "$3" ] ; then
6 echo "make-redirect.sh builddir prefix_dir new_url_base"
8 echo "Creates .htaccess output for redirecting all .deb and .rpm files"
9 echo "to another website."
11 echo "builddir is where the resulting tree of release-bm.sh is located"
13 echo "prefix_dir is the path from the redirecting site, from the"
14 echo "root of the domain name. Must start with a slash."
15 echo "For example: /binary-meta"
17 echo "new_url_base is the base URL of the site where the real files"
18 echo "exist. Do not use a trailing slash, as it will be appended"
19 echo "with the filename."
23 echo " make-redirect.sh bmbuild /binary-meta http://downloads.sourceforge.net/project/barry/binary-meta/20111020"
32 # Build Packages and Contents, for all distros, per arch
33 for file in $
(cd $BUILDDIR && find * -type f \
( -name "*.rpm" -o -name "*.deb" \
) -print) ; do
34 echo "Redirect 302 $PREFIX_DIR/$file $NEW_URL_BASE/$file"