Skip to content

Instantly share code, notes, and snippets.

@sabzil sabzil/mkscope.sh
Created Mar 29, 2019

Embed
What would you like to do?
mkscope.sh
#!/bin/bash
rm cscope.files cscope.out
if ["$GOROOT" = ""]; then
echo "GOROOT is not set"
GOROOT=`go env | grep "GOROOT" | cut -d "=" -f2`
GOROOT=${GOROOT#\"}
GOROOT=${GOROOT%\"}
fi
echo $GOROOT
go_src=$GOROOT/src
find $go_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
You can’t perform that action at this time.