Skip to content

Instantly share code, notes, and snippets.

@mineo
Forked from anonymous/lala.sh
Created October 6, 2011 11:12
Show Gist options
  • Save mineo/1267154 to your computer and use it in GitHub Desktop.
Save mineo/1267154 to your computer and use it in GitHub Desktop.
#!/bin/bash
# needs python-stdeb and git
repos=('git://github.com/mineo/lala.git'
'git://github.com/kennethreitz/requests.git'
'git://github.com/mineo/pyanihttp.git')
for repo in ${repos[@]};do
dirname=${repo##*/}
dirname=${dirname%%.git}
if [ -d $dirname ];then
pushd $dirname > /dev/null
git pull origin master
else
git clone $repo
pushd $dirname > /dev/null
fi
[ $dirname = "requests" ] && git checkout $(git tag |sort -r | head -n1)
python setup.py --command-packages=stdeb.command bdist_deb
sudo dpkg -i deb_dist/python-$dirname*deb
rm -rf deb_dist
[ $dirname = "requests" ] && git checkout master
popd > /dev/null
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment