]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
pakfire: We use a very light bash version for now.
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 1 Jun 2010 22:30:29 +0000 (00:30 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 1 Jun 2010 22:30:29 +0000 (00:30 +0200)
pkgs/core/pakfire/src/Makefile
pkgs/core/pakfire/src/pakfire.sh [new file with mode: 0644]

index d493db343e3014982cbaa28df6aaea63bcc56257..ec706b490c42163c64dba4072cac5c9a529c0e21 100644 (file)
@@ -7,7 +7,10 @@ PYTHON_DIR = $(DESTDIR)/usr/lib/python$(PYTHON_MAJ)/site-packages/pakfire
 all: pakfire
 
 pakfire: pakfire.in
-       $(SUBSTITUDE) pakfire.in > pakfire
+       #$(SUBSTITUDE) pakfire.in > pakfire
+
+       # XXX Just for now:
+       cp -vf pakfire.sh pakfire
 
 clean:
        rm -vf pakfire python/*.py[co]
diff --git a/pkgs/core/pakfire/src/pakfire.sh b/pkgs/core/pakfire/src/pakfire.sh
new file mode 100644 (file)
index 0000000..f2c36f1
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+decompress() {
+       local file=${1}
+
+       [ -e "${file}" ] || return
+
+       cpio --quiet --extract --to-stdout data.img < ${file} \
+               | tar xvvJ -C /
+}
+
+action=${1}
+shift
+
+case "${action}" in
+       localinstall)
+               for file in $@; do
+                       decompress ${file}
+               done
+               ;;
+       *)
+               echo
+               echo "This is only a very light version to install"
+               echo "packages easyly."
+               echo "Run: ${0} localinstall <file>.ipk [<file>.ipk ...]"
+               echo
+               ;;
+esac