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
This commit is contained in:
Mark Olesen
2008-10-22 14:33:59 +02:00
parent 342b1847c7
commit 50a2ddfcc7
19 changed files with 382 additions and 347 deletions

View File

@ -3,22 +3,23 @@
# default is pwd
if [ "$#" -eq 0 ]
then
set -- .
set -- .
elif [ "$1" = "-h" -o "$1" = "-help" ]
then
echo "Usage: ${0##*/} [dir1] .. [dirN]"
echo " remove all .o files"
exit 1
echo "Usage: ${0##*/} [dir1] .. [dirN]"
echo " remove all .o files"
exit 1
fi
for i
do
if [ -d "$i" ]
then
echo "removing all .o files: $i"
find $i -name '*.o' -print | xargs -t rm
else
echo "no directory: $i"
fi
if [ -d "$i" ]
then
echo "removing all .o files: $i"
find $i -name '*.o' -print | xargs -t rm 2>/dev/null
else
echo "no directory: $i" 1>&2
fi
done
#------------------------------------------------------------------------------