From: Michael Tremer Date: Sun, 6 Sep 2009 21:23:06 +0000 (+0200) Subject: Add tool to extract python eggs. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=853e54c7b8d0f50635f03528faada54fadf3e500;p=ipfire-3.x.git Add tool to extract python eggs. --- diff --git a/lfs/Config b/lfs/Config index 81096c86e..f2e5f4199 100644 --- a/lfs/Config +++ b/lfs/Config @@ -104,6 +104,7 @@ INSTALL_INITSCRIPT = echo "Installing initscript \"$(INITSCRIPT)\" -> /etc/init" install -m 644 $(DIR_SOURCE)/initscripts/extras/$(INITSCRIPT).conf /etc/init/ PYTHON_COMPILE = find /usr/lib/python*/ -name *.py | xargs /usr/bin/py-compile +PYTHON_EXTRACT_EGG = $(DIR_SOURCE)/scripts/py-extract-egg DO_FIND_ROOTFILE = $$(find $(DIR_SOURCE)/rootfiles/{core,extras,debug}/{$(TARGET),} -type f \ -maxdepth 1 -name "$(LFS_FILE)" 2>/dev/null | head -n1) diff --git a/src/scripts/py-extract-egg b/src/scripts/py-extract-egg new file mode 100755 index 000000000..fe017135b --- /dev/null +++ b/src/scripts/py-extract-egg @@ -0,0 +1,16 @@ +#!/bin/bash + +# Extract python eggs + +EGG=${1} + +if [ -z "${EGG}" ] || [ ! -e "${EGG}" ]; then + echo "$0: No egg given or file does not exist." >&2 + exit 1 +fi + +cd $(dirname ${EGG}) + +unzip -o ${EGG} || exit 1 + +rm -rf EGG-INFO #${EGG}