github.com/abhinav/git-pr@v0.6.1-0.20171029234004-54218d68c11b/scripts/fix-mock-vendor.sh (about) 1 #!/bin/bash -ex 2 3 # Fixes the import of vendored directories inside mocks 4 5 PACKAGE=$(go list .) 6 find . '(' -name .git -o -name vendor ')' -prune -o -name '*.go' \ 7 -exec grep -l "Automatically generated by MockGen" '{}' ';' \ 8 -exec sed -i '' -e "s|\"$PACKAGE/vendor/|\"|" '{}' ';'