#!/bin/sh #------------------------------------------------------------------------------ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | www.openfoam.com # \\/ M anipulation | #------------------------------------------------------------------------------- # Copyright (C) 2011-2016 OpenFOAM Foundation #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM, distributed under GPL-3.0-or-later. # # Script # findEmptyMake # # Description # Usage: findEmptyMake [dir1 .. dirN] # # Find Make/ directories without a 'files' or 'options' file. # This can occur when a directory has been moved. #------------------------------------------------------------------------------ usage() { exec 1>&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat<&2 else echo "skipping non-dir: $checkDir" 1>&2 continue fi find $checkDir -depth -name Make -type d -print | while read makeDir do [ -r "$makeDir/files" -a -r "$makeDir/options" ] || echo "$makeDir" done done #------------------------------------------------------------------------------