libk  Diff

Differences From Artifact [254d63007c]:

To Artifact [2fb772064d]:


1
2
3
4
5
6
7
8
9
10
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
}



|







1
2
3
4
5
6
7
8
9
10
me=$0
say() { echo >&2 "($me) $1";      }
has() { command -v $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
}