Created
January 31, 2012 20:01
-
-
Save snargledorf/1712580 to your computer and use it in GitHub Desktop.
Script for retrieving package source using apt-get. Tested under Ubuntu 11.10
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 | |
if [ $# < 1 ] || [ $# > 2 ] | |
then | |
echo -e "Usage: \n$0 <package name> \n$0 <package name> <dir>" | |
exit 1 | |
fi | |
if [ $# == 2 ] | |
then | |
mkdir -p $2 | |
cd $2 | |
fi | |
sudo apt-get build-dep $1 | |
sudo apt-get source $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment