Created
April 21, 2014 15:47
-
-
Save bopjiang/11146574 to your computer and use it in GitHub Desktop.
create cscope index for go project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# generate cscope index files in current directory | |
# the generated cscope index files also include go standard packages | |
if [ $GOROOT = "" ] | |
then | |
echo "GOROOT is not set" | |
exit 1 | |
fi | |
go_pkg_src=$GOROOT/src/pkg | |
find $go_pkg_src -name "*.go" -print > cscope.files | |
find . -name "*.go" -print >> cscope.files | |
if cscope -b -k; then | |
echo "Done" | |
else | |
echo "Failed" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment