#!/bin/bash # Copyright 2012-2014 Canonical Ltd. # git-lp -- launchpad collaboration tool for git users # Written by Zygmunt Krynicki # Licensed under 3-clause BSD license, see COPYING for details gitlp_version='0.3' function checksum_bzrlib() { # Perform md5 checksum of bzrlib/index.py to see if has been patched local bzrlib_bad_checksum=0 local bzrlib_path=`exec /usr/bin/python -c "import bzrlib; print bzrlib.__file__"` local bzrlib_path=$(dirname "${bzrlib_path}") local bzrlib_index="${bzrlib_path}/index.py" local checksum=$(md5sum ${bzrlib_index} | cut -f1 -d" ") case $checksum in a4a8558d3c74ca226fbbbbd388d26294|917f04f90bc54f1ef6fd45c7f62544ce) ;; be697c0baccfae2641fd1ed036e96334) # Ubuntu 15.10 2.6.0+bzr6602-2ubuntu2 ;; *) bzrlib_bad_checksum=1 esac # Abort if bzr has not been patched if [ $bzrlib_bad_checksum -eq 1 ]; then cat <