#!/bin/bash # $Id: fix-old-makefiles,v 1.1 2003-04-20 18:53:54 steve Exp $ # Fix old Makefile's by removing definitions for FTP and HOST, # which are now defined in SRCDIR/WURM.cf # # This script is designed to be hand-edited for whatever fixup needs to be # performed; it's unlikely that any particular fixup will be needed twice. # # cmd: the PERL mini-script to be applied to every line of each Makefile. # typically either a conditional print, or a substitution. cmd='print unless /^(FTP|HOST)/;' # flags: -i is edit in place; use -i.bak for testing # -n is loop over lines without printing; use with print unless... # -p is like -n but prints -- good for use with s/// flags="-i -n" find . -name Makefile -exec perl $flags -e "$cmd" {} \;