#!/bin/bash # # svnfind.sh - helper wrapper for running 'find' in svn checkouts # Copyright (C) 2007 Clifford Wolf # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. cmd="exec find" addarg() { local t="'" arg for arg; do cmd="$cmd '${arg//$t/$t\\$t$t}'"; done } while [ $# -gt 0 -a ".${1#-}" = ".$1" ]; do addarg "$1"; shift done addarg '(' '(' ! -wholename '*/.svn/*' ! -wholename '*/.svn' ')' if [ $# -gt 0 ]; then addarg '(' "$@" ')' fi addarg ')' eval "$cmd"