]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
Add tool to extract python eggs.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 6 Sep 2009 21:23:06 +0000 (23:23 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 6 Sep 2009 21:23:06 +0000 (23:23 +0200)
lfs/Config
src/scripts/py-extract-egg [new file with mode: 0755]

index 81096c86ee0d56a9867e9e99bef82498295843d3..f2e5f4199d04ad2d9d76816e18f620d0b0b2aec5 100644 (file)
@@ -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 (executable)
index 0000000..fe01713
--- /dev/null
@@ -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}