Show More
@@ -1,23 +1,13 b'' | |||
|
1 |
#require test-repo |
|
|
1 | #require test-repo | |
|
2 | 2 | |
|
3 | 3 | $ cd "`dirname "$TESTDIR"`" |
|
4 | 4 | |
|
5 |
look for python scripts |
|
|
5 | look for python scripts that do not use /usr/bin/env | |
|
6 | 6 | |
|
7 | $ hg files 'set:**.py and not exec() and grep(r"^#!.*?python")' | |
|
8 | [1] | |
|
9 | ||
|
10 | look for python scripts with execute bit but not shebang | |
|
11 | ||
|
12 | $ hg files 'set:**.py and exec() and not grep(r"^#!.*?python")' | |
|
7 | $ hg files 'set:grep(r"^#!.*?python") and not grep(r"^#!/usr/bin/env python")' | |
|
13 | 8 | [1] |
|
14 | 9 | |
|
15 |
look for shell scripts |
|
|
16 | ||
|
17 | $ hg files 'set:**.sh and exec() and not grep(r"^#!.*(ba)?sh")' | |
|
18 | [1] | |
|
10 | look for shell scripts that do not use /bin/sh | |
|
19 | 11 | |
|
20 | look for non scripts with no shebang | |
|
21 | ||
|
22 | $ hg files 'set:exec() and not **.sh and not **.py and not grep(r"^#!")' | |
|
12 | $ hg files 'set:grep(r"^#!.*/bin/sh") and not grep(r"^#!/bin/sh")' | |
|
23 | 13 | [1] |
General Comments 0
You need to be logged in to leave comments.
Login now