Skip to content

Instantly share code, notes, and snippets.

@jnoller
Created May 5, 2011 18:23
Show Gist options
  • Save jnoller/957589 to your computer and use it in GitHub Desktop.
Save jnoller/957589 to your computer and use it in GitHub Desktop.
pyswap
function pyswap () {
branch=$1
if [ -f "Makefile" ]; then
echo "====================== make pycremoval ======================"
make pycremoval
echo "====================== distclean ======================"
make distclean
if test $? -ne 0 ; then
echo "distclean failed! (may be a clean checkout)?"
return 1
fi
fi
echo "====================== hg up $branch ======================"
hg up $branch
if test $? -ne 0 ; then
echo "hg up to branch $branch failed!"
return 1
fi
echo "====================== configure ======================"
./configure
if test $? -ne 0 ; then
echo "configure failed!"
return 1
fi
echo "====================== make ======================"
make
if test $? -ne 0 ; then
echo "make failed!"
return 1
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment