[pypy-svn] r48887 - pypy/dist/pypy/translator

antocuni at codespeak.net antocuni at codespeak.net
Wed Nov 21 10:37:20 CET 2007


Author: antocuni
Date: Wed Nov 21 10:37:20 2007
New Revision: 48887

Modified:
   pypy/dist/pypy/translator/driver.py
Log:
use type -p instead of which because BSD's which is broken (thanks xoraxax)



Modified: pypy/dist/pypy/translator/driver.py
==============================================================================
--- pypy/dist/pypy/translator/driver.py	(original)
+++ pypy/dist/pypy/translator/driver.py	Wed Nov 21 10:37:20 2007
@@ -665,7 +665,7 @@
         newexename = basename
         f = file(newexename, 'w')
         f.write("""#!/bin/bash
-LEDIT=`which ledit 2>/dev/null`
+LEDIT=`type -p ledit`
 if [ `uname -o` = 'Cygwin' ]; then MONO=; else MONO=mono; fi
 $LEDIT $MONO "$(dirname $0)/$(basename $0)-data/%s" "$@" # XXX doesn't work if it's placed in PATH
 """ % main_exe_name)
@@ -735,7 +735,7 @@
         newexename = basename
         f = file(newexename, 'w')
         f.write("""#!/bin/bash
-LEDIT=`which ledit 2>/dev/null`
+LEDIT=`type -p ledit`
 $LEDIT java -jar $0.jar "$@"
 """)
         f.close()


More information about the pypy-svn mailing list