mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
- 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
20 lines
543 B
Bash
Executable File
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
|
|
|
|
#------------------------------------------------------------------------------
|