github.com/cockroachdb/cockroachdb-parser@v0.23.3-0.20240213214944-911057d40c9a/pkg/sql/parser/help_gen_test.sh (about) 1 #!/usr/bin/env bash 2 3 # Trigger this script by running `make generate PKG=./pkg/sql/parser` from the 4 # repository root to ensure your PATH includes vendored binaries. 5 6 set -euo pipefail 7 8 # We need to set these environment variables to ensure the output of 9 # `sort` is the same everywhere. 10 export LC_ALL=C 11 export LANG=C 12 13 cat <<EOF 14 // Code generated by help_gen_test.sh. DO NOT EDIT. 15 // GENERATED FILE DO NOT EDIT 16 17 package parser 18 19 var expectedHelpStrings = []string{ 20 EOF 21 22 grep 'helpWith(' | sed -e 's/^.*sqllex,//g;s/).*/,/g' | grep -v '""' | sort -u 23 24 cat <<EOF 25 } 26 EOF