Permalink
Browse files

Some portability fixes (#14)

- include correct regex header on FreeBSD
- use #!/usr/bin/env instead of hardcoded Linux paths
- find shells with which
  • Loading branch information...
myfreeweb authored and andychu committed Jul 8, 2017
1 parent 4ec6fb3 commit 7ad8ebe3ab5c22b67419120a430abf957de547cc
Showing with 233 additions and 224 deletions.
  1. +1 −1 asdl/arith_ast.py
  2. +1 −1 asdl/arith_ast_test.py
  3. +1 −1 asdl/arith_parse.py
  4. +1 −1 asdl/arith_parse_test.py
  5. +1 −1 asdl/asdl_demo.py
  6. +1 −1 asdl/encode_test.py
  7. +1 −1 asdl/gen_cpp.py
  8. +1 −1 asdl/py_meta.py
  9. +1 −1 asdl/py_meta_test.py
  10. +1 −1 asdl/run.sh
  11. +1 −1 asdl/tdop.py
  12. +1 −1 benchmarks/awk-python.sh
  13. +1 −1 benchmarks/startup.sh
  14. +1 −1 bin/oil.py
  15. +1 −1 bin/opy_.py
  16. +1 −1 build/actions.sh
  17. +1 −1 build/app_deps.py
  18. +1 −1 build/app_deps_test.py
  19. +1 −1 build/c_module_srcs.py
  20. +1 −1 build/c_module_toc.py
  21. +1 −1 build/common.sh
  22. +1 −1 build/compile.sh
  23. +1 −1 build/config1.sh
  24. +1 −1 build/make_zip.py
  25. +1 −1 build/prepare.sh
  26. +2 −2 build/pylibc.sh
  27. +1 −1 build/runpy_deps.py
  28. +1 −1 build/setup.py
  29. +1 −1 build/stats.sh
  30. +1 −1 build/test.sh
  31. +1 −1 build/testdata/future_import.py
  32. +1 −1 build/testdata/hello.py
  33. +1 −1 build/testdata/lib.py
  34. +1 −1 core/args.py
  35. +1 −1 core/args_test.py
  36. +1 −1 core/braces.py
  37. +1 −1 core/braces_test.py
  38. +1 −1 core/builtin.py
  39. +1 −1 core/cmd_exec.py
  40. +1 −1 core/cmd_exec_test.py
  41. +1 −1 core/completion.py
  42. +1 −1 core/completion_test.py
  43. +1 −1 core/expr_eval.py
  44. +1 −1 core/glob_.py
  45. +1 −1 core/glob_test.py
  46. +1 −1 core/id_kind.py
  47. +1 −1 core/id_kind_gen.py
  48. +1 −1 core/id_kind_test.py
  49. +1 −1 core/lexer.py
  50. +1 −1 core/lexer_test.py
  51. +1 −1 core/process.py
  52. +1 −1 core/process_test.py
  53. +1 −1 core/reader.py
  54. +1 −1 core/runtime.py
  55. +1 −1 core/shell_test.py
  56. +1 −1 core/state.py
  57. +1 −1 core/state_test.py
  58. +1 −1 core/tdop.py
  59. +1 −1 core/test_lib.py
  60. +1 −1 core/ui.py
  61. +1 −1 core/util.py
  62. +1 −1 core/util_test.py
  63. +1 −1 core/word_eval_test.py
  64. +1 −1 core/word_test.py
  65. +1 −1 deps.sh
  66. +5 −1 native/libc.c
  67. +1 −1 native/libc_test.py
  68. +1 −1 opy/build.sh
  69. +1 −1 opy/byterun/run.sh
  70. +1 −1 opy/byterun/test_basic.py
  71. +1 −1 opy/byterun/test_exceptions.py
  72. +1 −1 opy/byterun/test_functions.py
  73. +1 −1 opy/byterun/test_with.py
  74. +1 −1 opy/common.sh
  75. +1 −1 opy/compare.sh
  76. +1 −1 opy/compiler2/symbols_test.py
  77. +1 −1 opy/misc/ccompile.py
  78. +1 −1 opy/misc/determinism.py
  79. +1 −1 opy/misc/pgen_ast.py
  80. +1 −1 opy/misc/py_ast.py
  81. +1 −1 opy/misc/stdlib_compile.py
  82. +1 −1 opy/opy_main.py
  83. +1 −1 opy/pgen2/pgen.py
  84. +1 −1 opy/run.sh
  85. +1 −1 opy/smoke.sh
  86. +1 −1 opy/tests/genexpr.py
  87. +1 −1 opy/tests/genexpr_simple.py
  88. +1 −1 opy/tools/compile.py
  89. +1 −1 opy/tools/demo.py
  90. +1 −1 opy/tools/dumppyc.py
  91. +1 −1 opy/tools/regrtest.py
  92. +1 −1 opy/util_opy.py
  93. +1 −1 osh/arith_parse.py
  94. +1 −1 osh/arith_parse_test.py
  95. +1 −1 osh/ast_.py
  96. +1 −1 osh/bool_parse.py
  97. +1 −1 osh/bool_parse_test.py
  98. +1 −1 osh/cmd_parse.py
  99. +1 −1 osh/cmd_parse_test.py
  100. +1 −1 osh/lex_test.py
  101. +1 −1 osh/word_parse.py
  102. +1 −1 osh/word_parse_test.py
  103. +1 −1 scripts/count.sh
  104. +1 −1 scripts/refactor.sh
  105. +1 −1 scripts/run.sh
  106. +1 −1 spec/01-bad-func.sh
  107. +1 −1 spec/02-bad-func.sh
  108. +1 −1 spec/03-glob.sh
  109. +1 −1 spec/04-case-in-subshell.sh
  110. +1 −1 spec/05-unterminated-single.sh
  111. +1 −1 spec/06-unterminated-double-long.sh
  112. +1 −1 spec/06-unterminated-double.sh
  113. +1 −1 spec/07-unterminated-here-doc.sh
  114. +1 −1 spec/08-dollar0.sh
  115. +1 −1 spec/09-here-doc-compound.sh
  116. +1 −1 spec/09-here-doc.sh
  117. +1 −1 spec/10-async.sh
  118. +1 −1 spec/11-brace-redirect.sh
  119. +1 −1 spec/12-command-sub-2.sh
  120. +1 −1 spec/12-command-sub.sh
  121. +1 −1 spec/13-big-here-doc.sh
  122. +1 −1 spec/14-parse-order.sh
  123. +1 −1 spec/15-subshell-error.sh
  124. +1 −1 spec/16-errexit.sh
  125. +1 −1 spec/append.test.sh
  126. +1 −1 spec/arith-context.test.sh
  127. +1 −1 spec/arith.test.sh
  128. +1 −1 spec/array-compat.test.sh
  129. +1 −1 spec/array.test.sh
  130. +1 −1 spec/assign.test.sh
  131. +1 −1 spec/assoc-zsh.test.sh
  132. +1 −1 spec/assoc.test.sh
  133. +1 −1 spec/background-status.sh
  134. +1 −1 spec/background.test.sh
  135. +1 −1 spec/bin/argv.py
  136. +1 −1 spec/bin/printenv.py
  137. +1 −1 spec/bin/read_from_fd.py
  138. +1 −1 spec/bin/show_fd_table.py
  139. +1 −1 spec/bin/stdout_stderr.py
  140. +1 −1 spec/blog1.test.sh
  141. +1 −1 spec/brace-expansion.test.sh
  142. +1 −1 spec/bugs.test.sh
  143. +1 −1 spec/builtin-vars.test.sh
  144. +1 −1 spec/builtins-special.test.sh
  145. +1 −1 spec/builtins.test.sh
  146. +1 −1 spec/case_.test.sh
  147. +1 −1 spec/command-parsing.test.sh
  148. +1 −1 spec/command-sub.test.sh
  149. +1 −1 spec/command_.test.sh
  150. +1 −1 spec/comments.sh
  151. +1 −1 spec/comments.test.sh
  152. +1 −1 spec/coproc.py
  153. +1 −1 spec/coproc.sh
  154. +1 −1 spec/dbracket.test.sh
  155. +1 −1 spec/declare.sh
  156. +1 −1 spec/dparen.test.sh
  157. +1 −1 spec/echo.sh
  158. +1 −1 spec/errexit.sh
  159. +1 −1 spec/explore-parsing.test.sh
  160. +1 −1 spec/export.sh
  161. +1 −1 spec/extended-glob.test.sh
  162. +1 −1 spec/for-expr.test.sh
  163. +1 −1 spec/func-parsing.test.sh
  164. +1 −1 spec/func.test.sh
  165. +1 −1 spec/glob.test.sh
  166. +1 −1 spec/here-doc.test.sh
  167. +1 −1 spec/history.sh
  168. +1 −1 spec/if_.test.sh
  169. +1 −1 spec/let.test.sh
  170. +1 −1 spec/line-number.sh
  171. +1 −1 spec/loop.test.sh
  172. +1 −1 spec/osh-only.test.sh
  173. +1 −1 spec/parse-errors.test.sh
  174. +1 −1 spec/pipeline.test.sh
  175. +1 −1 spec/posix.test.sh
  176. +1 −1 spec/process-sub.test.sh
  177. +1 −1 spec/quote.test.sh
  178. +1 −1 spec/readonly.sh
  179. +1 −1 spec/redirect.test.sh
  180. +1 −1 spec/regex.test.sh
  181. +1 −1 spec/runtime-errors.sh
  182. +1 −1 spec/scope.sh
  183. +1 −1 spec/sh-options.test.sh
  184. +1 −1 spec/shell-grammar.test.sh
  185. +1 −1 spec/show-fd-table.sh
  186. +1 −1 spec/smoke.test.sh
  187. +1 −1 spec/special-vars.test.sh
  188. +1 −1 spec/subshell.test.sh
  189. +1 −1 spec/test-builtin.test.sh
  190. +1 −1 spec/tilde.test.sh
  191. +1 −1 spec/unicode.sh
  192. +1 −1 spec/var-num.test.sh
  193. +1 −1 spec/var-op-other.test.sh
  194. +1 −1 spec/var-op-strip.test.sh
  195. +1 −1 spec/var-op-test.test.sh
  196. +1 −1 spec/var-ref.test.sh
  197. +1 −1 spec/var-sub-quote.test.sh
  198. +1 −1 spec/var-sub.test.sh
  199. +1 −1 spec/word-eval.test.sh
  200. +1 −1 spec/word-split.test.sh
  201. +1 −1 spec/xtrace.sh
  202. +1 −1 test/gold.sh
  203. +1 −1 test/lint.sh
  204. +1 −1 test/osh2oil.sh
  205. +1 −1 test/publish.sh
  206. +1 −1 test/sh_spec.py
  207. +1 −1 test/sh_spec_test.py
  208. +1 −1 test/smoke.sh
  209. +1 −1 test/spec-runner.sh
  210. +15 −10 test/spec.sh
  211. +1 −1 test/unit.sh
  212. +1 −1 test/wild.sh
  213. +1 −1 test/wild2.sh
  214. +1 −1 tools/osh2oil_test.py
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
"""
arith_ast.py
"""
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
"""
arith_ast_test.py: Tests for arith_ast.py
"""
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
from __future__ import print_function
"""
arith_parse.py: Parse shell-like and C-like arithmetic.
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
from asdl import tdop
from asdl import arith_parse
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
from __future__ import print_function
"""
asdl_demo.py
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
"""
encode_test.py: Tests for encode.py
"""
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
from __future__ import print_function
"""
asdl_cpp.py
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
"""
py_meta.py
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
"""
py_meta_test.py: Tests for py_meta.py
"""
View
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Automation for ASDL.
#
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
"""
tdop.py
"""
View
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test awk vs Python speed.
#
View
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Usage:
# ./startup.sh <function name>
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# Copyright 2016 Andy Chu. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
"""
opy_.py
"""
View
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Build actions used in the Makefile.
#
View
@@ -1,4 +1,4 @@
#!/usr/bin/python -S
#!/usr/bin/env python -S
"""
py_deps.py
View
@@ -1,4 +1,4 @@
#!/usr/bin/python -S
#!/usr/bin/env python -S
"""
app_deps_test.py: Tests for app_deps.py
"""
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
"""
c_module_srcs.py
"""
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
"""
c_module_toc.py
"""
View
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -o nounset
set -o pipefail
View
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Usage:
# ./compile.sh <function name>
View
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Use clang for the C compiler.
#
View
@@ -1,4 +1,4 @@
#!/usr/bin/python -S
#!/usr/bin/env python -S
"""
make_zip.py
View
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Do a full CPython build out of tree, so we can walk dependencies dynamically.
#
View
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Build Python extension modules. We use symlinks instead of installing them
# globally (or using virtualenv).
@@ -19,7 +19,7 @@ build() {
shopt -s failglob
local so=$(echo _build/pylibc/$arch/libc.so)
ln -s -f --verbose $so libc.so
ln -s -f -v $so libc.so
file libc.so
}
View
@@ -1,4 +1,4 @@
#!/usr/bin/python -S
#!/usr/bin/env python -S
"""
runpy_deps.py
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
from distutils.core import setup, Extension
module = Extension('libc',
View
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Stats about build artifacts.
#
View
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Usage:
# ./test.sh <function name>
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
"""
future_import.py
"""
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
"""
hello.py
"""
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
"""
lib.py
"""
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
"""
args.py - Flag, option, and arg parsing for the shell.
View
@@ -1,4 +1,4 @@
#!/usr/bin/python -S
#!/usr/bin/env python -S
"""
args_test.py: Tests for args.py
"""
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
from __future__ import print_function
"""
braces.py
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
"""
braces_test.py: Tests for braces.py
"""
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# Copyright 2016 Andy Chu. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# Copyright 2016 Andy Chu. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# Copyright 2016 Andy Chu. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# Copyright 2016 Andy Chu. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# Copyright 2016 Andy Chu. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# Copyright 2016 Andy Chu. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
"""
glob_.py
"""
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
"""
glob_test.py: Tests for glob.py
"""
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# Copyright 2016 Andy Chu. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# Copyright 2016 Andy Chu. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# Copyright 2016 Andy Chu. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# Copyright 2016 Andy Chu. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
"""
lexer_test.py: Tests for lexer.py
"""
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# Copyright 2016 Andy Chu. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
View
@@ -1,4 +1,4 @@
#!/usr/bin/python -S
#!/usr/bin/env python -S
"""
process_test.py: Tests for process.py
"""
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# Copyright 2016 Andy Chu. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
"""
core/runtime.py -- Parse runtime.asdl and dynamically create classes on this module.
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# Copyright 2016 Andy Chu. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# Copyright 2016 Andy Chu. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
View
@@ -1,4 +1,4 @@
#!/usr/bin/python -S
#!/usr/bin/env python -S
"""
state_test.py: Tests for state.py
"""
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
"""
tdop.py - Library for expression parsing.
"""
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# Copyright 2016 Andy Chu. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# Copyright 2016 Andy Chu. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# Copyright 2016 Andy Chu. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# Copyright 2016 Andy Chu. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# Copyright 2016 Andy Chu. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
View
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
"""
word_test.py: Tests for word.py
"""
View
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Install development dependencies.
#
Oops, something went wrong.

0 comments on commit 7ad8ebe

Please sign in to comment.