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
set -eu
case "$1" in
"pkgs")
get_pkgs
;;
"ccomp")
get_compiler
;;
*)
exit 1
;;
esac
# Given a GOARCH target, return the GCC for that target.
function get_compiler() {
case "$GOARCH" in
@ -44,4 +32,16 @@ function get_pkgs() {
# We (currently) don't need to install more packages on amd64.
;;
esac
}
}
case "$1" in
"pkgs")
get_pkgs
;;
"ccomp")
get_compiler
;;
*)
exit 1
;;
esac