On 12/09/14 17:11, Doug Hellmann wrote: > I also use git-hooks with a post-checkout script to remove pyc files any time > I change between branches, which is especially helpful if the different > branches have code being moved around: > > git-hooks: https://github.com/icefox/git-hooks > > The script: > > $ cat ~/.git_hooks/post-checkout/remove_pyc > #!/bin/sh > echo "Removing pyc files from `pwd`" > find . -name '*.pyc' | xargs rm -f > exit 0
Good thing that python modules can't have spaces in their names! But for the future, find has a "-delete" parameter that won't break horribly on strange filenames. find . -name '*.pyc' -delete -- Radomir Dopieralski _______________________________________________ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev