1#!/bin/sh
2# Usage: utils/fix-perms.sh
3# fixes the permissions of the files in the build tree
4#
5# To verify:   find . -type f -perm /111
6
7root=${1:-.}
8
9echo "fixing permissions under [${root}]"
10
11find ${root} -type f -follow -perm /111 '(' \
12     -name '*.in' \
13  -o -name '*.xml' \
14  -o -name '*.xsl' \
15  -o -name '*.css' \
16  -o -name '*.html' \
17  -o -name '*.png' \
18  -o -name '*.xsl' \
19  -o -name '*.m4' \
20  -o -name '*.h' \
21  -o -name '*.c' \
22  -o -name '*.d' \
23  -o '(' -name '*.lisp' -a '!' -name 'gen-uninames.lisp' ')' \
24  -o -name '*.tst' \
25  -o -name '*.bat' \
26  -o -name 'link.sh' \
27  -o -name '.hgignore' \
28  -o -name '.hgtags' \
29  -o -name 'Makefile*' \
30  -o -name 'README' \
31  ')' \
32  -exec chmod -c a-x '{}' ';'
33
34find ${root} -name configure -exec chmod -c u+x '{}' ';'
35