From 8a6952804f4c45b896fc7ce247eece2d02122eb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Andr=C3=A9e?= Date: Thu, 17 Jan 2013 23:53:13 +0100 Subject: [PATCH] Some process in porting to Haiku. Haiku does not have Python 3, only Python 2.6.8, and handles ANSI escapes sequences a bit different despite reporting to be xterm. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- haiku-ise.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 haiku-ise.sh diff --git a/haiku-ise.sh b/haiku-ise.sh new file mode 100755 index 00000000..274b65b3 --- /dev/null +++ b/haiku-ise.sh @@ -0,0 +1,12 @@ +#!sh +sed -i 's_#!/usr/bin/env python3_#!python_g' *.py +sed -i 's_print(_printout(_g' *.py +sed -i 's_.buffer._._g' *.py +sed -i 's_\x1b39_\x1b37_g' */*.pony +sed -i 's_\x1b49_\x1b40_g' */*.pony +sed -i 's_;39_;37_g' */*.pony +sed -i 's_;49_;40_g' */*.pony +sed -i 's_sys.std_std_g' *.py +sed -i 's_def printout(_stdout = os.fdopen(1, '\''wb'\'')\x0adef printout(_g' *.py +sed -i 's_def printerr(_stderr = os.fdopen(2, '\''wb'\'')\x0adef printerr(_g' *.py +sed -i 's_stdout = _stdin = os.fdopen(0, '\''rb'\'')\x0astdout = _g' *.py