From 83e3f295154cc645712c8f9586a8651f9c8cca42 Mon Sep 17 00:00:00 2001 From: Caleb Xavier Berger Date: Mon, 18 Jan 2021 15:05:01 +0000 Subject: [PATCH] Bash is a single-pass language --- .github/workflows/get-compiler.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/get-compiler.sh b/.github/workflows/get-compiler.sh index f0209cc48..addd2e987 100755 --- a/.github/workflows/get-compiler.sh +++ b/.github/workflows/get-compiler.sh @@ -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 -} \ No newline at end of file +} + +case "$1" in +"pkgs") + get_pkgs + ;; +"ccomp") + get_compiler + ;; +*) + exit 1 + ;; +esac \ No newline at end of file