Skip to content

Instantly share code, notes, and snippets.

@moyashi
Created July 16, 2010 07:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moyashi/478077 to your computer and use it in GitHub Desktop.
Save moyashi/478077 to your computer and use it in GitHub Desktop.
#!/bin/sh
# example: undeb com.hoge_0.1.deb
if [ $# -ne 1 ]; then
echo "ERROR: wrong number of arguments."
exit 1
fi
if [ -f $1 ]; then
dpkg-deb -x $1 ${1%.deb}
dpkg-deb -e $1 ${1%.deb}/DEBIAN
if [ -f ${1%.deb}/DEBIAN/control ]; then
rm -f $1
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment