-
-
Save fuzzamos/aa6523058af6dec8a0125a5d8d660287 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| # installs dependenies and builds ubuntu package from source | |
| # set CC / CXX environment variables as needed | |
| USAGE="$0 <apt package> ..." | |
| if [ $# -lt 1 ]; then | |
| echo "$USAGE" | |
| exit 1 | |
| fi | |
| CPU_COUNT=$(getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null || echo 1) | |
| while (($#)); do | |
| FUZZ_TARGET=$1 | |
| mkdir -p /tmp/$FUZZ_TARGET && \ | |
| cd /tmp/$FUZZ_TARGET && \ | |
| sudo apt-get build-dep -y $FUZZ_TARGET && \ | |
| apt-get source -y $FUZZ_TARGET && \ | |
| cd * && \ | |
| sudo dpkg-buildpackage -uc -us -j $(( $CPU_COUNT -1 )) | |
| shift | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment