github.com/grafana/synthetic-monitoring-agent@v0.64.2/scripts/list-proto (about) 1 #!/bin/sh 2 3 op=list 4 5 while true ; do 6 [ "$#" -eq 0 ] && break 7 8 getopts 'e' opt 9 10 case $opt in 11 e) 12 op="find" 13 shift 14 ;; 15 *) 16 echo "Usage: $0 [-e]" 17 exit 1 18 ;; 19 esac 20 done 21 22 23 case "$op" in 24 list) 25 git ls-files -z | 26 grep -zE '\.proto$' | 27 sort -z | 28 tr '\0' '\n' 29 ;; 30 31 find) 32 git ls-files -z | 33 grep -qzE '\.proto$' 34 ;; 35 esac