mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
Remove magic hack
It should be assumed that on modern development environments, python is accessible to /usr/bin/env Change the shebang as necessary and remove the magic hack. This also means losing the -E option on the call to python, so that PYTHONPATH and PYTHONHOME will be respected and local configuration problems in those vars would be noticed Change-Id: I6f0708ca7693f05a4c3621c338f03619563ba630
This commit is contained in:
parent
52f1e5d911
commit
8898e2f26d
10
main.py
10
main.py
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/usr/bin/env python
|
||||||
#
|
#
|
||||||
# Copyright (C) 2008 The Android Open Source Project
|
# Copyright (C) 2008 The Android Open Source Project
|
||||||
#
|
#
|
||||||
@ -14,14 +14,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
magic='--calling-python-from-/bin/sh--'
|
|
||||||
"""exec" python -E "$0" "$@" """#$magic"
|
|
||||||
if __name__ == '__main__':
|
|
||||||
import sys
|
|
||||||
if sys.argv[-1] == '#%s' % magic:
|
|
||||||
del sys.argv[-1]
|
|
||||||
del magic
|
|
||||||
|
|
||||||
import getpass
|
import getpass
|
||||||
import imp
|
import imp
|
||||||
import netrc
|
import netrc
|
||||||
|
10
repo
10
repo
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/usr/bin/env python
|
||||||
|
|
||||||
## repo default configuration
|
## repo default configuration
|
||||||
##
|
##
|
||||||
@ -19,14 +19,6 @@ REPO_REV='stable'
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
magic='--calling-python-from-/bin/sh--'
|
|
||||||
"""exec" python -E "$0" "$@" """#$magic"
|
|
||||||
if __name__ == '__main__':
|
|
||||||
import sys
|
|
||||||
if sys.argv[-1] == '#%s' % magic:
|
|
||||||
del sys.argv[-1]
|
|
||||||
del magic
|
|
||||||
|
|
||||||
# increment this whenever we make important changes to this script
|
# increment this whenever we make important changes to this script
|
||||||
VERSION = (1, 19)
|
VERSION = (1, 19)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user