31 lines
465 B
Bash
31 lines
465 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
if [ "${RUNNER_OS}" = "Windows" ] ; then
|
||
|
ext=".exe"
|
||
|
else
|
||
|
ext=''
|
||
|
fi
|
||
|
|
||
|
echo_color() {
|
||
|
local color="$1"
|
||
|
local msg="$2"
|
||
|
echo -e "\033[${color}m${msg}\033[0m"
|
||
|
}
|
||
|
|
||
|
error() { echo_color "${RED}" "$1"; }
|
||
|
warn() { echo_color "${LT_BROWN}" "$1"; }
|
||
|
info() { echo_color "${LT_BLUE}" "$1"; }
|
||
|
|
||
|
fail() { error "error: $1"; exit 1; }
|
||
|
|
||
|
mktempdir() {
|
||
|
case "$(uname -s)" in
|
||
|
"Darwin"|"darwin")
|
||
|
mktemp -d -t hls_ci.XXXXXXX
|
||
|
;;
|
||
|
*)
|
||
|
mktemp -d
|
||
|
;;
|
||
|
esac
|
||
|
}
|