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
diff --git a/main.py b/main.py
index b43a48f..f41fb80 100755
--- a/main.py
+++ b/main.py
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env python
#
# Copyright (C) 2008 The Android Open Source Project
#
@@ -14,14 +14,6 @@
# See the License for the specific language governing permissions and
# 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 imp
import netrc
diff --git a/repo b/repo
index 80eff8f..96302c0 100755
--- a/repo
+++ b/repo
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env python
## repo default configuration
##
@@ -19,14 +19,6 @@
# See the License for the specific language governing permissions and
# 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
VERSION = (1, 19)