Created
December 1, 2012 11:19
-
-
Save refnode/4181565 to your computer and use it in GitHub Desktop.
Check build deps for python-for-android
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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