package unsermake
tag 393049 patch
thanks

Replace debian/patches/unsermake.diff by the attached patch, which
works by pointing the executable wrapper to the proper directory. This
patch also makes the package work even if default python version
changes and eliminates the useless setting of PYTHONPATH.


--- unsermake.orig      2006-11-04 15:56:25.000000000 -0600
+++ unsermake   2006-11-04 15:59:36.000000000 -0600
@@ -1,16 +1,9 @@
-#! /bin/sh
+#! /bin/bash
 
-self="$0"
-if test -L "$self"; then
-    try=`readlink $self 2>/dev/null` && self=$try
-fi
-mods=`dirname $self`
-directory=`dirname $mods`
-mod=`basename $mods`
-if test -n "$PYTHONPATH"; then
-   export PYTHONPATH=$directory:$PYTHONPATH
-else
-   export PYTHONPATH=$directory
-fi
-exec python -c "import $mod; $mod.main()" --modules $mods "$@"
+PYTHON=$(pyversions -d)
+
+mods=/var/lib/python-support/$PYTHON/unsermake
+mod=unsermake
+
+exec $PYTHON -c "import $mod; $mod.main()" --modules $mods "$@"
 

Reply via email to