Skip to content

Instantly share code, notes, and snippets.

@cl4u2
Created July 14, 2017 10:36
Show Gist options
  • Save cl4u2/62c2869899e19a31ef5192a71af41897 to your computer and use it in GitHub Desktop.
Save cl4u2/62c2869899e19a31ef5192a71af41897 to your computer and use it in GitHub Desktop.
#!/bin/bash
TARGET_IPK=$1
if [ -z "$1" ]; then
echo "Usage: $0 <target ipk>"
exit 1
fi
LOCALDIR="$(pwd)"
IPKTMPDIR="$(mktemp -d)"
cd "$IPKTMPDIR"
tar xvf "${LOCALDIR}/${1}"
DEBNAME="$(basename $1 .ipk).deb"
ar rcv "${LOCALDIR}/${DEBNAME}" debian-binary control.tar.gz data.tar.gz
echo "---> $DEBNAME"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment