#!/bin/csh -f # # execmod cmd modules # # Execute a command, once in each module directory. # # Example usage: # execmod "echo hi" parser commands utils # # rcsid $Header: /ufs/repository/magic/scripts/execmod,v 1.2 2001/01/12 22:13:21 jsolomon Exp $ # set cmd="$1" foreach mod ( $argv[2-] ) echo ' ' >>& make.log echo ------- Module $mod ------- >>& make.log echo -n "pushd " >>& make.log pushd $mod >& /dev/null echo Executing: $cmd >>& ../make.log echo $cmd sh -c $cmd echo -n "popd " >>& ../make.log popd >& /dev/null end