From 3982ccb3559d777911ab2ffa2984bc784481b2e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= <piotr@debian.org> Date: Thu, 17 Jun 2010 13:03:23 +0200 Subject: [PATCH] strip "python" from $2 --- runtime.d/public_modules.rtinstall | 3 ++- runtime.d/public_modules.rtremove | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/runtime.d/public_modules.rtinstall b/runtime.d/public_modules.rtinstall index b89bf31..7d6b9a6 100755 --- a/runtime.d/public_modules.rtinstall +++ b/runtime.d/public_modules.rtinstall @@ -1,7 +1,8 @@ #! /bin/sh -e +VERSION=${2#python} if which python >/dev/null 2>&1 && which pycompile >/dev/null 2>&1; then - pycompile -V $2 /usr/lib/python$2/ + pycompile -V $VERSION /usr/lib/$VERSION/ else echo >&2 "python or pycompile not found in $(basename $0) hook." exit 1 diff --git a/runtime.d/public_modules.rtremove b/runtime.d/public_modules.rtremove index fac5c75..94569a4 100755 --- a/runtime.d/public_modules.rtremove +++ b/runtime.d/public_modules.rtremove @@ -1,7 +1,8 @@ #! /bin/sh -e +VERSION=${2#python} if which python >/dev/null 2>&1 && which pyclean >/dev/null 2>&1; then - pyclean -V $2 /usr/lib/python$2/ + pyclean -V $VERSION /usr/lib/python$VERSION/ else - find /usr/lib/python$2/ -name '*.py[co]' -delete + find /usr/lib/python$VERSION/ -name '*.py[co]' -delete fi -- GitLab