-
Notifications
You must be signed in to change notification settings - Fork 0
/
setmods
executable file
·26 lines (20 loc) · 768 Bytes
/
setmods
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
# This script sets the unix file modes for pygame files. Specifically it
# sets the executabled bit for any python files starting with the
# '#!/usr/bin/env python' sha-bang. Searching is restricted to the base
# and examples directories. The Pygame policy is to not preserve
# executable mode in SVN. It is left as an end-user choice. It is safe to
# commit executable files as their modes are not copied to SVN.
#
SHA_BANG='^#! */usr/bin/env python'
PROGS="*.py examples/*.py"
for name in `grep -le "$SHA_BANG" $PROGS`
do
chmod a+x "$name"
done
# Also make sure none of the files in lib/ are executable...
# like the font file which was in the 1.8.1release.
chmod -x lib/*.ttf
chmod -x lib/*.py
chmod -x lib/threads/*.py
chmod -x lib/gp2x/*.py