Skip to content

Instantly share code, notes, and snippets.

@refnode
Created December 1, 2012 11:19
Show Gist options
  • Save refnode/4181565 to your computer and use it in GitHub Desktop.
Save refnode/4181565 to your computer and use it in GitHub Desktop.
Check build deps for python-for-android
DEB_UBUNTU="build_essential zlib1g-dev cython"
# Check installation state of a debian package list.
# Return all missing packages.
function check_pkg_deb_installed() {
PKGS=$1
MISSING_PKGS=""
for PKG in $PKGS; do
CHECK=$(dpkg -s $PKG 2>&1)
if [ $? -eq 1 ]; then
MISSING_PKGS="$PKG $MISSING_PKGS"
fi
done
echo $MISSING_PKGS
}
function check_build_deps() {
DIST=$(lsb_release -is)
case $DIST in
"Ubuntu")
MISSING_PKGS=$(check_deb_pkg $DEB_UBUNTU)
....
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment