author | kergoth <kergoth> | 2002-08-29 19:57:13 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-08-29 19:57:13 (UTC) |
commit | 598b2f4c404c2e12f59c2abc765f58bb8d0862a3 (patch) (unidiff) | |
tree | cbf2e207033ca7afdd4aa3368b919000f79fe78d /scripts/ipkg-unbuild | |
parent | 4b864b9a6509d3b43be34d39264a9c23f5240641 (diff) | |
download | opie-598b2f4c404c2e12f59c2abc765f58bb8d0862a3.zip opie-598b2f4c404c2e12f59c2abc765f58bb8d0862a3.tar.gz opie-598b2f4c404c2e12f59c2abc765f58bb8d0862a3.tar.bz2 |
We use new ipk format now.
-rwxr-xr-x | scripts/ipkg-unbuild | 29 |
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 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | set -e | ||
4 | |||
5 | if [ $# -lt 1 ]; then | ||
6 | echo "usage: $0: package.ipk" | ||
7 | exit 1 | ||
8 | fi | ||
9 | |||
10 | while [ $# -gt 0 ]; do | ||
11 | filename=$1 | ||
12 | shift | ||
13 | |||
14 | pkg=`echo $filename | sed 's/.*\///;s/.ipk$//;s/.deb$//'` | ||
15 | |||
16 | mkdir -p $pkg | ||
17 | mkdir -p $pkg/CONTROL | ||
18 | |||
19 | pkg_dir=$PWD | ||
20 | cd $pkg; (ar x ../$filename || tar zxf ../$filename) >& /dev/null | ||
21 | cd $pkg_dir | ||
22 | |||
23 | tar xzf $pkg/data.tar.gz -C $pkg | ||
24 | tar xzf $pkg/control.tar.gz -C $pkg/CONTROL | ||
25 | rm -f $pkg/control.tar.gz $pkg/data.tar.gz $pkg/debian-binary | ||
26 | done | ||
27 | |||
28 | |||
29 | |||