ci: Update
This commit is contained in:
parent
61fdf07a2e
commit
d20a448227
3 changed files with 51 additions and 29 deletions
|
|
@ -23,7 +23,12 @@ pick() {
|
|||
shift
|
||||
|
||||
seed_file="$(mktemp)"
|
||||
echo "$seed" > "$seed_file"
|
||||
echo "$seed" >"$seed_file"
|
||||
# We add 16 more bytes to the seed file for sufficient entropy. Otherwise Cygwin's sort
|
||||
# for example complains and I'm sure there are more platforms that would too.
|
||||
# edit: nvm disabled for now, we don't use Cygwin anyway, we use MinGW who has a sort
|
||||
# that behaves correctly.
|
||||
# echo "================" >"$seed_file"
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
echo "$1"
|
||||
|
|
@ -85,11 +90,16 @@ _echo() {
|
|||
printf '%s\n' "$*"
|
||||
}
|
||||
|
||||
get_rand_color() {
|
||||
# 1-6 are regular and 9-14 are bright.
|
||||
# 1,2 and 9,10 are red and green but we use those for success and failure.
|
||||
pick "$*" 1 2 3 4 5 6 \
|
||||
9 10 11 12 13 14
|
||||
get_rand_color() {
|
||||
colors=""
|
||||
ncolors=$(command tput colors)
|
||||
if [ "$ncolors" -ge 8 ]; then
|
||||
colors="$colors 1 2 3 4 5 6"
|
||||
elif [ "$ncolors" -ge 16 ]; then
|
||||
colors="$colors 9 10 11 12 13 14"
|
||||
fi
|
||||
pick "$*" $colors
|
||||
}
|
||||
|
||||
echop() {
|
||||
|
|
@ -301,27 +311,28 @@ LIB_RELEASE=1
|
|||
|
||||
goos() {
|
||||
case $1 in
|
||||
macos) echo darwin ;;
|
||||
*) echo $1 ;;
|
||||
macos) echo darwin;;
|
||||
*) echo $1;;
|
||||
esac
|
||||
}
|
||||
|
||||
os() {
|
||||
uname=$(uname)
|
||||
case $uname in
|
||||
Linux) echo linux ;;
|
||||
Darwin) echo macos ;;
|
||||
FreeBSD) echo freebsd ;;
|
||||
*) echo "$uname" ;;
|
||||
Linux) echo linux;;
|
||||
Darwin) echo macos;;
|
||||
FreeBSD) echo freebsd;;
|
||||
CYGWIN_NT*|MINGW32_NT*) echo windows;;
|
||||
*) echo "$uname";;
|
||||
esac
|
||||
}
|
||||
|
||||
arch() {
|
||||
uname_m=$(uname -m)
|
||||
case $uname_m in
|
||||
aarch64) echo arm64 ;;
|
||||
x86_64) echo amd64 ;;
|
||||
*) echo "$uname_m" ;;
|
||||
aarch64) echo arm64;;
|
||||
x86_64) echo amd64;;
|
||||
*) echo "$uname_m";;
|
||||
esac
|
||||
}
|
||||
|
||||
|
|
|
|||
2
ci/sub
2
ci/sub
|
|
@ -1 +1 @@
|
|||
Subproject commit 4d9ab8f8d7fb298a7b1b948b8910986b9703f2bd
|
||||
Subproject commit 98bd6a2a9a1a4e4051326c0f32d158570fe05977
|
||||
39
install.sh
39
install.sh
|
|
@ -28,7 +28,12 @@ pick() {
|
|||
shift
|
||||
|
||||
seed_file="$(mktemp)"
|
||||
echo "$seed" > "$seed_file"
|
||||
echo "$seed" >"$seed_file"
|
||||
# We add 16 more bytes to the seed file for sufficient entropy. Otherwise Cygwin's sort
|
||||
# for example complains and I'm sure there are more platforms that would too.
|
||||
# edit: nvm disabled for now, we don't use Cygwin anyway, we use MinGW who has a sort
|
||||
# that behaves correctly.
|
||||
# echo "================" >"$seed_file"
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
echo "$1"
|
||||
|
|
@ -90,11 +95,16 @@ _echo() {
|
|||
printf '%s\n' "$*"
|
||||
}
|
||||
|
||||
get_rand_color() {
|
||||
# 1-6 are regular and 9-14 are bright.
|
||||
# 1,2 and 9,10 are red and green but we use those for success and failure.
|
||||
pick "$*" 1 2 3 4 5 6 \
|
||||
9 10 11 12 13 14
|
||||
get_rand_color() {
|
||||
colors=""
|
||||
ncolors=$(command tput colors)
|
||||
if [ "$ncolors" -ge 8 ]; then
|
||||
colors="$colors 1 2 3 4 5 6"
|
||||
elif [ "$ncolors" -ge 16 ]; then
|
||||
colors="$colors 9 10 11 12 13 14"
|
||||
fi
|
||||
pick "$*" $colors
|
||||
}
|
||||
|
||||
echop() {
|
||||
|
|
@ -437,27 +447,28 @@ LIB_RELEASE=1
|
|||
|
||||
goos() {
|
||||
case $1 in
|
||||
macos) echo darwin ;;
|
||||
*) echo $1 ;;
|
||||
macos) echo darwin;;
|
||||
*) echo $1;;
|
||||
esac
|
||||
}
|
||||
|
||||
os() {
|
||||
uname=$(uname)
|
||||
case $uname in
|
||||
Linux) echo linux ;;
|
||||
Darwin) echo macos ;;
|
||||
FreeBSD) echo freebsd ;;
|
||||
*) echo "$uname" ;;
|
||||
Linux) echo linux;;
|
||||
Darwin) echo macos;;
|
||||
FreeBSD) echo freebsd;;
|
||||
CYGWIN_NT*|MINGW32_NT*) echo windows;;
|
||||
*) echo "$uname";;
|
||||
esac
|
||||
}
|
||||
|
||||
arch() {
|
||||
uname_m=$(uname -m)
|
||||
case $uname_m in
|
||||
aarch64) echo arm64 ;;
|
||||
x86_64) echo amd64 ;;
|
||||
*) echo "$uname_m" ;;
|
||||
aarch64) echo arm64;;
|
||||
x86_64) echo amd64;;
|
||||
*) echo "$uname_m";;
|
||||
esac
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue