Skip to content
Snippets Groups Projects
Commit 3982ccb3 authored by Piotr Ożarowski's avatar Piotr Ożarowski
Browse files

strip "python" from $2

parent 021816ea
No related branches found
No related tags found
No related merge requests found
#! /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
......
#! /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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment