1 |
Bash variable substitution is simpler and faster. It will also allow us |
2 |
to spare the pipes in the next commit. |
3 |
--- |
4 |
gx86/eclass/python-utils-r1.eclass | 3 ++- |
5 |
1 file changed, 2 insertions(+), 1 deletion(-) |
6 |
|
7 |
diff --git a/gx86/eclass/python-utils-r1.eclass b/gx86/eclass/python-utils-r1.eclass |
8 |
index 81e6d59..1ab8366 100644 |
9 |
--- a/gx86/eclass/python-utils-r1.eclass |
10 |
+++ b/gx86/eclass/python-utils-r1.eclass |
11 |
@@ -493,8 +493,9 @@ _python_rewrite_shebang() { |
12 |
|
13 |
local f |
14 |
for f; do |
15 |
- local shebang=$(head -n 1 "${f}" | sed 's/\r$//') |
16 |
+ local shebang=$(head -n 1 "${f}") |
17 |
local from |
18 |
+ shebang=${shebang%$'\r'} |
19 |
debug-print "${FUNCNAME}: path = ${f}" |
20 |
debug-print "${FUNCNAME}: shebang = ${shebang}" |
21 |
|
22 |
-- |
23 |
1.8.1.5 |