From 7e9adc7b31cda4b8cd476d14435f96873d884236 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 1 Jun 2010 09:23:47 +0200 Subject: [PATCH] ENH: add wmakeFindEmptyMake, -help option for wmakeFilesAndOptions wmakeFindEmptyMake: - Find 'Make/' directories without 'files' or 'options'. These typically correspond to (partially) removed applications. --- wmake/wmakeFilesAndOptions | 35 ++++++++++++++- wmake/wmakeFindEmptyMake | 87 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+), 1 deletion(-) create mode 100755 wmake/wmakeFindEmptyMake diff --git a/wmake/wmakeFilesAndOptions b/wmake/wmakeFilesAndOptions index 61984eea07..d2e8cf29c2 100755 --- a/wmake/wmakeFilesAndOptions +++ b/wmake/wmakeFilesAndOptions @@ -26,7 +26,7 @@ # wmakeFilesAndOptions # # Description -# Script to scan the current directory for directories and source files +# Scan current directory for directories and source files # and construct Make/files and Make/options # # Usage : wmakeFilesAndOptions @@ -34,6 +34,39 @@ #------------------------------------------------------------------------------ Script=${0##*/} +usage() { + while [ "$#" -ge 1 ]; do echo "$1"; shift; done + cat<. +# +# Script +# wmakeFindEmptyMake +# +# Description +# Find 'Make/' directories without 'files' or 'options'. +# These typically correspond to (partially) removed applications. +# +#------------------------------------------------------------------------------ +usage() { + while [ "$#" -ge 1 ]; do echo "$1"; shift; done + cat<&2 + echo "---------" 1>&2 + else + echo "skipping non-dir: $checkDir" 1>&2 + echo "----------------" 1>&2 + continue + fi + + find $checkDir -depth -type d -name Make -print | while read MakeDir + do + [ -f "$MakeDir/files" -o -f "$MakeDir/options" ] || echo $MakeDir + done +done + +#------------------------------------------------------------------------------