Getting MASTER_SITES for sourceforge ports more easily

Eygene Ryabinkin rea-fbsd at codelabs.ru
Sat Nov 14 07:54:20 UTC 2009


Sat, Nov 14, 2009 at 09:16:47AM +0300, Eygene Ryabinkin wrote:
> The attached shell script should produce the MASTER_SITE_SUBDIR for the
> SF-hosted ports for each URL given in the command-line.

Inlining the script -- it was dropped by the Mailman:
-----
#!/bin/sh

while [ -n "$1" ]; do
	echo "$1" | sed -Ee's%^htt(p|ps)://(sourceforge|sf)\.net/projects/(.*)/[^/]*/download$%MASTER_SITE_SUBDIR=	\3%'
	shift
done
-----
-- 
Eygene
 _                ___       _.--.   #
 \`.|\..----...-'`   `-._.-'_.-'`   #  Remember that it is hard
 /  ' `         ,       __.--'      #  to read the on-line manual
 )/' _/     \   `-_,   /            #  while single-stepping the kernel.
 `-'" `"\_  ,_.-;_.-\_ ',  fsc/as   #
     _.-'_./   {_.'   ; /           #    -- FreeBSD Developers handbook
    {_.-``-'         {_/            #


More information about the freebsd-ports mailing list