open-nomad/vendor/github.com/onsi/ginkgo/before_pr.sh
2018-03-12 10:30:56 -05:00

13 lines
315 B
Bash
Executable file

# Take current path
path=$(pwd)
# Split it
IFS='\/'; arrIN=($path); unset IFS;
# Find directory before ginkgo
len=${#arrIN[@]}
userDir=${arrIN[$len-2]}
# Replace onsi with userdir
find . -type f -name '*.go' -exec sed -i '' s/github.com\\/onsi\\/ginkgo\\/internal/github.com\\/$userDir\\/ginkgo\\/internal/ {} +