mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
usage and argument handling for bin/rm* and bin/touch* utilities
This commit is contained in:
@ -1,2 +1,24 @@
|
||||
#!/bin/sh
|
||||
find . \( -name '*.class' \) -print | xargs -t rm
|
||||
|
||||
# default is pwd
|
||||
if [ "$#" -eq 0 ]
|
||||
then
|
||||
set -- .
|
||||
elif [ "$1" = "-h" -o "$1" = "-help" ]
|
||||
then
|
||||
echo "Usage: ${0##*/} [dir1] .. [dirN]"
|
||||
echo " remove all .class files"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for i
|
||||
do
|
||||
if [ -d "$i" ]
|
||||
then
|
||||
echo "removing all .class files"
|
||||
find $i -name '*.class' -print | xargs -t rm
|
||||
else
|
||||
echo "no directory: $i"
|
||||
fi
|
||||
done
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user