annotate setmods @ 3172:d1b367fc08bc tests-returncode

Use a return code of 1 when the tests fail.
author Thomas Kluyver <takowl@gmail.com>
date Wed, 09 Jan 2013 10:13:57 +0000
parents e3a61fb10443
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1632
5b79a988540f add setmods script missing from r 2129
Lenard Lindstrom <len-l@telus.net>
parents:
diff changeset
1 #!/bin/bash
5b79a988540f add setmods script missing from r 2129
Lenard Lindstrom <len-l@telus.net>
parents:
diff changeset
2
5b79a988540f add setmods script missing from r 2129
Lenard Lindstrom <len-l@telus.net>
parents:
diff changeset
3 # This script sets the unix file modes for pygame files. Specifically it
5b79a988540f add setmods script missing from r 2129
Lenard Lindstrom <len-l@telus.net>
parents:
diff changeset
4 # sets the executabled bit for any python files starting with the
5b79a988540f add setmods script missing from r 2129
Lenard Lindstrom <len-l@telus.net>
parents:
diff changeset
5 # '#!/usr/bin/env python' sha-bang. Searching is restricted to the base
5b79a988540f add setmods script missing from r 2129
Lenard Lindstrom <len-l@telus.net>
parents:
diff changeset
6 # and examples directories. The Pygame policy is to not preserve
5b79a988540f add setmods script missing from r 2129
Lenard Lindstrom <len-l@telus.net>
parents:
diff changeset
7 # executable mode in SVN. It is left as an end-user choice. It is safe to
5b79a988540f add setmods script missing from r 2129
Lenard Lindstrom <len-l@telus.net>
parents:
diff changeset
8 # commit executable files as their modes are not copied to SVN.
5b79a988540f add setmods script missing from r 2129
Lenard Lindstrom <len-l@telus.net>
parents:
diff changeset
9 #
5b79a988540f add setmods script missing from r 2129
Lenard Lindstrom <len-l@telus.net>
parents:
diff changeset
10
5b79a988540f add setmods script missing from r 2129
Lenard Lindstrom <len-l@telus.net>
parents:
diff changeset
11 SHA_BANG='^#! */usr/bin/env python'
5b79a988540f add setmods script missing from r 2129
Lenard Lindstrom <len-l@telus.net>
parents:
diff changeset
12 PROGS="*.py examples/*.py"
5b79a988540f add setmods script missing from r 2129
Lenard Lindstrom <len-l@telus.net>
parents:
diff changeset
13
5b79a988540f add setmods script missing from r 2129
Lenard Lindstrom <len-l@telus.net>
parents:
diff changeset
14 for name in `grep -le "$SHA_BANG" $PROGS`
5b79a988540f add setmods script missing from r 2129
Lenard Lindstrom <len-l@telus.net>
parents:
diff changeset
15 do
5b79a988540f add setmods script missing from r 2129
Lenard Lindstrom <len-l@telus.net>
parents:
diff changeset
16 chmod a+x "$name"
5b79a988540f add setmods script missing from r 2129
Lenard Lindstrom <len-l@telus.net>
parents:
diff changeset
17 done
5b79a988540f add setmods script missing from r 2129
Lenard Lindstrom <len-l@telus.net>
parents:
diff changeset
18
1633
e3a61fb10443 Added -x on lib files... Should this be moved into the setup.py ?
Rene Dudfield <renesd@gmail.com>
parents: 1632
diff changeset
19 # Also make sure none of the files in lib/ are executable...
e3a61fb10443 Added -x on lib files... Should this be moved into the setup.py ?
Rene Dudfield <renesd@gmail.com>
parents: 1632
diff changeset
20 # like the font file which was in the 1.8.1release.
e3a61fb10443 Added -x on lib files... Should this be moved into the setup.py ?
Rene Dudfield <renesd@gmail.com>
parents: 1632
diff changeset
21 chmod -x lib/*.ttf
e3a61fb10443 Added -x on lib files... Should this be moved into the setup.py ?
Rene Dudfield <renesd@gmail.com>
parents: 1632
diff changeset
22 chmod -x lib/*.py
e3a61fb10443 Added -x on lib files... Should this be moved into the setup.py ?
Rene Dudfield <renesd@gmail.com>
parents: 1632
diff changeset
23 chmod -x lib/threads/*.py
e3a61fb10443 Added -x on lib files... Should this be moved into the setup.py ?
Rene Dudfield <renesd@gmail.com>
parents: 1632
diff changeset
24 chmod -x lib/gp2x/*.py
1632
5b79a988540f add setmods script missing from r 2129
Lenard Lindstrom <len-l@telus.net>
parents:
diff changeset
25
1633
e3a61fb10443 Added -x on lib files... Should this be moved into the setup.py ?
Rene Dudfield <renesd@gmail.com>
parents: 1632
diff changeset
26