build: allow to build on FreeBSD (#22285)
* fix(build): checksum failed on FreeBSD * fix(build): avoid BSD make evaluate Makefile This Makefile use GNU make functions which is not compatible with the BSD make. In order to avoid BSD make to try evaluation the Makefile and because the Makefile use GNU make functions renaming the from Makefile to GNUmakefile does not change anything for GNU make users and expose a clear error when someone try to evaluate with BSD make. * fix(build): invalid shebang on FreeBSDpull/22928/head
parent
edb21abe91
commit
5a1e3752c7
|
@ -27,8 +27,17 @@ curl -Ls https://github.com/influxdata/ui/releases/download/OSS-Master/sha256.tx
|
|||
curl -L https://github.com/influxdata/ui/releases/download/OSS-Master/build.tar.gz --output build.tar.gz
|
||||
|
||||
# Verify the checksums match; exit if they don't.
|
||||
echo "$(cat sha256.txt)" | sha256sum --check -- \
|
||||
|| { echo "Checksums did not match for downloaded UI assets!"; exit 1; }
|
||||
case "$(uname -s)" in
|
||||
FreeBSD | Darwin)
|
||||
echo "$(cat sha256.txt)" | shasum --algorithm 256 --check \
|
||||
|| { echo "Checksums did not match for downloaded UI assets!"; exit 1; } ;;
|
||||
Linux)
|
||||
echo "$(cat sha256.txt)" | sha256sum --check -- \
|
||||
|| { echo "Checksums did not match for downloaded UI assets!"; exit 1; } ;;
|
||||
*)
|
||||
echo "The '$(uname -s)' operating system is not supported" >&2
|
||||
exit 1
|
||||
esac
|
||||
|
||||
# Extract the assets and clean up.
|
||||
mkdir -p "$STATIC_DIR/data"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
tmpdir=$(mktemp -d)
|
||||
trap "{ rm -rf ${tmpdir}; }" EXIT
|
||||
|
|
Loading…
Reference in New Issue