#!/bin/sh # Attempt to automatically make ports from a directory listing, given a # "template" file containing __PACKAGE__ and __VERSION__ strings to be replaced # in the individual Makefiles. elinks -dump "$1" | grep '://.*bz2' | sed 's,.*/\([^/]*\)-\([0-9.]*\).tar.bz2,\1 \2,' | while read package version ; do mkdir -p $package sed -e 's,__PACKAGE__,'$package',g' -e 's,__VERSION__,'$version',g' template >$package/Makefile done