mirror of
https://github.com/urbit/shrub.git
synced 2024-12-21 01:41:37 +03:00
29 lines
579 B
Bash
Executable File
29 lines
579 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
: "${MAKE:=make}"
|
|
|
|
log () {
|
|
echo "$@" >&2;
|
|
}
|
|
|
|
for impl in ENT_GETENTROPY_UNISTD \
|
|
ENT_GETENTROPY_SYSRANDOM \
|
|
ENT_GETRANDOM_SYSCALL \
|
|
ENT_GETENTROPY_BCRYPTGENRANDOM \
|
|
ENT_DEV_URANDOM
|
|
do
|
|
export IMPL=$impl
|
|
|
|
log "Trying IMPL=$IMPL"
|
|
|
|
if IMPL=$impl ${MAKE} >/dev/null 2>/dev/null
|
|
then sed -i 's|$(error IMPL must be set)|IMPL='"$impl"'|' Makefile
|
|
log "IMPL=$IMPL works"
|
|
exit 0
|
|
else log "IMPL=$IMPL failed"
|
|
fi
|
|
done
|
|
|
|
log "This shouldn't happen, something is broken."
|
|
exit 1
|