diff options
Diffstat (limited to 'ci/utils.sh')
-rw-r--r-- | ci/utils.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ci/utils.sh b/ci/utils.sh index 1cf2b6dc..f3dc96d2 100644 --- a/ci/utils.sh +++ b/ci/utils.sh @@ -55,6 +55,13 @@ gcc_prefix() { esac } +is_musl() { + case "$TARGET" in + *-musl) return 0 ;; + *) return 1 ;; + esac +} + is_x86() { case "$(architecture)" in amd64|i386) return 0 ;; @@ -62,6 +69,13 @@ is_x86() { esac } +is_x86_64() { + case "$(architecture)" in + amd64) return 0 ;; + *) return 1 ;; + esac +} + is_arm() { case "$(architecture)" in armhf) return 0 ;; @@ -82,3 +96,12 @@ is_osx() { *) return 1 ;; esac } + +builder() { + if is_musl && is_x86_64; then + cargo install cross + echo "cross" + else + echo "cargo" + fi +} |