ci: Update
This commit is contained in:
parent
61fdf07a2e
commit
d20a448227
3 changed files with 51 additions and 29 deletions
|
|
@ -24,6 +24,11 @@ pick() {
|
||||||
|
|
||||||
seed_file="$(mktemp)"
|
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
|
while [ $# -gt 0 ]; do
|
||||||
echo "$1"
|
echo "$1"
|
||||||
|
|
@ -85,11 +90,16 @@ _echo() {
|
||||||
printf '%s\n' "$*"
|
printf '%s\n' "$*"
|
||||||
}
|
}
|
||||||
|
|
||||||
get_rand_color() {
|
|
||||||
# 1-6 are regular and 9-14 are bright.
|
# 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.
|
get_rand_color() {
|
||||||
pick "$*" 1 2 3 4 5 6 \
|
colors=""
|
||||||
9 10 11 12 13 14
|
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() {
|
echop() {
|
||||||
|
|
@ -312,6 +322,7 @@ os() {
|
||||||
Linux) echo linux;;
|
Linux) echo linux;;
|
||||||
Darwin) echo macos;;
|
Darwin) echo macos;;
|
||||||
FreeBSD) echo freebsd;;
|
FreeBSD) echo freebsd;;
|
||||||
|
CYGWIN_NT*|MINGW32_NT*) echo windows;;
|
||||||
*) echo "$uname";;
|
*) echo "$uname";;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
ci/sub
2
ci/sub
|
|
@ -1 +1 @@
|
||||||
Subproject commit 4d9ab8f8d7fb298a7b1b948b8910986b9703f2bd
|
Subproject commit 98bd6a2a9a1a4e4051326c0f32d158570fe05977
|
||||||
19
install.sh
19
install.sh
|
|
@ -29,6 +29,11 @@ pick() {
|
||||||
|
|
||||||
seed_file="$(mktemp)"
|
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
|
while [ $# -gt 0 ]; do
|
||||||
echo "$1"
|
echo "$1"
|
||||||
|
|
@ -90,11 +95,16 @@ _echo() {
|
||||||
printf '%s\n' "$*"
|
printf '%s\n' "$*"
|
||||||
}
|
}
|
||||||
|
|
||||||
get_rand_color() {
|
|
||||||
# 1-6 are regular and 9-14 are bright.
|
# 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.
|
get_rand_color() {
|
||||||
pick "$*" 1 2 3 4 5 6 \
|
colors=""
|
||||||
9 10 11 12 13 14
|
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() {
|
echop() {
|
||||||
|
|
@ -448,6 +458,7 @@ os() {
|
||||||
Linux) echo linux;;
|
Linux) echo linux;;
|
||||||
Darwin) echo macos;;
|
Darwin) echo macos;;
|
||||||
FreeBSD) echo freebsd;;
|
FreeBSD) echo freebsd;;
|
||||||
|
CYGWIN_NT*|MINGW32_NT*) echo windows;;
|
||||||
*) echo "$uname";;
|
*) echo "$uname";;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue