File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- #! /usr/local/ bin/python
1+ #! /usr/bin/env python
22
3- # Fix Python script(s) to reference the interpreter in /usr/local/ bin.
3+ # Fix Python script(s) to reference the interpreter via /usr/bin/env python .
44
55import sys
66import regex
@@ -15,13 +15,13 @@ def main():
1515 print file , ': can\' t open for update'
1616 continue
1717 line = f .readline ()
18- if regex .match ('^#! */usr/local/python' , line ) < 0 :
19- print file , ': not a /usr/local/python script'
18+ if regex .match ('^#! */usr/local/bin/ python' , line ) < 0 :
19+ print file , ': not a /usr/local/bin/ python script'
2020 f .close ()
2121 continue
2222 rest = f .read ()
23- line = regsub .sub ('/usr/local/python' , \
24- '/usr/local/ bin/python' , line )
23+ line = regsub .sub ('/usr/local/bin/ python' ,
24+ '/usr/bin/env python' , line )
2525 print file , ':' , `line`
2626 f .seek (0 )
2727 f .write (line )
You can’t perform that action at this time.
0 commit comments