Bash is a single-pass language

This commit is contained in:
Caleb Xavier Berger 2021-01-18 15:05:01 +00:00 committed by GitHub
parent bbf10a9c0b
commit 83e3f29515

View file

@ -1,18 +1,6 @@
#!/bin/bash #!/bin/bash
set -eu set -eu
case "$1" in
"pkgs")
get_pkgs
;;
"ccomp")
get_compiler
;;
*)
exit 1
;;
esac
# Given a GOARCH target, return the GCC for that target. # Given a GOARCH target, return the GCC for that target.
function get_compiler() { function get_compiler() {
case "$GOARCH" in case "$GOARCH" in
@ -45,3 +33,15 @@ function get_pkgs() {
;; ;;
esac esac
} }
case "$1" in
"pkgs")
get_pkgs
;;
"ccomp")
get_compiler
;;
*)
exit 1
;;
esac