[vlc-commits] contrib: use POSIX options for find(1)

Sean McGovern git at videolan.org
Fri Dec 18 11:52:38 CET 2015


vlc | branch: master | Sean McGovern <gseanmcg at gmail.com> | Thu Dec 17 19:49:48 2015 -0500| [cccd1b6572406a6e9c4d2fa09b2029be071411ab] | committer: Jean-Baptiste Kempf

contrib: use POSIX options for find(1)

-maxdepth is a GNU extension

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cccd1b6572406a6e9c4d2fa09b2029be071411ab
---

 contrib/src/change_prefix.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/src/change_prefix.sh b/contrib/src/change_prefix.sh
index 4363620..e3809bb 100755
--- a/contrib/src/change_prefix.sh
+++ b/contrib/src/change_prefix.sh
@@ -45,7 +45,7 @@ fi
 
 # process [dir] [filemask] [text only]
 process() {
-    for file in `find $1 -maxdepth 1 -type f -name "$2"`
+    for file in `find $1 \( ! -name \`basename $1\` -o -type f \) -prune -type f -name "$2"`
     do
         if [ -n "$3" ]
         then



More information about the vlc-commits mailing list