Created
August 8, 2017 06:46
-
-
Save amon-ra/3ddae617ebf09e5c5b961797215478ff to your computer and use it in GitHub Desktop.
apt-build hack to install only from source
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
#!/bin/bash | |
#USAGE: apt-build -aptget /usr/local/bin/apt-src-only.sh install $package | |
PARAMS=$* | |
if [[ $* == *"build-dep"* ]]; then | |
PACKAGES_TO_BUILD=$(apt-get -s $PARAMS 2> /dev/null | grep -e '^Inst ' | awk -F '[ \(]' '{print $2"="$4}') | |
apt-build --aptget $0 install $PACKAGES_TO_BUILD | |
else | |
apt-get $* | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment