libk  Artifact [85eaa3b261]

Artifact 85eaa3b26179031f9460fe4aaca59fef16dc2807960d6a00b71ff3c1d4ad3757:


me=$0
say() { echo >&2 "($me) $1";      }
has() { which $1 >/dev/null 2>&1; return $?; }
check() {
	var=$1
	test "${!var}" == "" || return 0
	say "we were not able to detect a default value for the configuration variable \$$var. please set this variable to $2 and try again."
	exit 1
}

test "$out" = "" && {
	say "\$out environment variable must be set to your build directory - are you running this script by hand? run ./build.sh in the root directory instead!"
	exit 2
}

reqpack() {
	if ! has "$1"; then
		say "to $2 for libk, install the $1 package and try again"
		exit 3
	fi
}