Files
openfoam/bin/rmdepall
Mark Olesen 50a2ddfcc7 bin/ wmake/ script updates
- send error messages to stderr
  - added -h/-help options where some were missing
  - changed 3-space to 4-space indentation
  - where possible, allow multiple directories from the command-line
2008-10-22 14:33:59 +02:00

20 lines
543 B
Bash
Executable File

#!/bin/sh
if [ "$1" = "-h" -o "$1" = "-help" -o "$#" -gt 1 ]
then
echo "Usage: ${0##*/} : remove all .dep files"
echo " ${0##*/} <file> : remove all .dep files referring to <file>"
exit 1
fi
if [ "$#" -eq 0 ]
then
echo "removing all .dep files"
find . -name '*.dep' -print | xargs -t rm 2>/dev/null
else
echo "removing all .dep files containing $1..."
find . -name '*.dep' -exec grep "$1" '{}' \; -exec rm '{}' \;
fi
#------------------------------------------------------------------------------