bootstrap (565B)
1 #!/bin/sh 2 3 # This is more portable than `which' but comes with 4 # the caveat of not(?) properly working on busybox's ash: 5 existence() 6 { 7 type "$1" >/dev/null 2>&1 8 } 9 10 if ! existence go; then 11 echo "Go binary not in $PATH!" 12 exit 1 13 fi 14 15 if ! existence swag; then 16 echo "WARNING: swag not found in \$PATH. The 'openapi' make target will not work." 17 echo " Install it with: go install github.com/swaggo/swag/cmd/swag@latest" 18 fi 19 20 if [ -d ".git" ]; then 21 mkdir -p internal/gana 22 git submodule update --init --recursive 23 git submodule sync --recursive 24 fi 25