summaryrefslogtreecommitdiff
path: root/scripts/ipkg-unbuild
authorkergoth <kergoth>2002-08-29 19:57:13 (UTC)
committer kergoth <kergoth>2002-08-29 19:57:13 (UTC)
commit598b2f4c404c2e12f59c2abc765f58bb8d0862a3 (patch) (side-by-side diff)
treecbf2e207033ca7afdd4aa3368b919000f79fe78d /scripts/ipkg-unbuild
parent4b864b9a6509d3b43be34d39264a9c23f5240641 (diff)
downloadopie-598b2f4c404c2e12f59c2abc765f58bb8d0862a3.zip
opie-598b2f4c404c2e12f59c2abc765f58bb8d0862a3.tar.gz
opie-598b2f4c404c2e12f59c2abc765f58bb8d0862a3.tar.bz2
We use new ipk format now.
Diffstat (limited to 'scripts/ipkg-unbuild') (more/less context) (show whitespace changes)
-rwxr-xr-xscripts/ipkg-unbuild29
1 files changed, 29 insertions, 0 deletions
diff --git a/scripts/ipkg-unbuild b/scripts/ipkg-unbuild
new file mode 100755
index 0000000..f724f75
--- a/dev/null
+++ b/scripts/ipkg-unbuild
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+set -e
+
+if [ $# -lt 1 ]; then
+ echo "usage: $0: package.ipk"
+ exit 1
+fi
+
+while [ $# -gt 0 ]; do
+ filename=$1
+ shift
+
+ pkg=`echo $filename | sed 's/.*\///;s/.ipk$//;s/.deb$//'`
+
+ mkdir -p $pkg
+ mkdir -p $pkg/CONTROL
+
+ pkg_dir=$PWD
+ cd $pkg; (ar x ../$filename || tar zxf ../$filename) >& /dev/null
+ cd $pkg_dir
+
+ tar xzf $pkg/data.tar.gz -C $pkg
+ tar xzf $pkg/control.tar.gz -C $pkg/CONTROL
+ rm -f $pkg/control.tar.gz $pkg/data.tar.gz $pkg/debian-binary
+done
+
+
+