summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2014-04-01 18:35:31 -0400
committerAlex Xu <alex_y_xu@yahoo.ca>2014-04-01 18:35:31 -0400
commitcfa401046d2ee1872bfbd16851f010abd837b82e (patch)
tree7c354b50acc050f92a460c4d4382d2630a372393 /configure
parentec0e4dfd6cc67d5b948fdd0bf419866271f04b44 (diff)
downloadhtml5ks-cfa401046d2ee1872bfbd16851f010abd837b82e.tar.xz
html5ks-cfa401046d2ee1872bfbd16851f010abd837b82e.zip
stuff
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure26
1 files changed, 21 insertions, 5 deletions
diff --git a/configure b/configure
index 007fec6..b3e4624 100755
--- a/configure
+++ b/configure
@@ -1,11 +1,11 @@
#!/bin/bash
checking() {
- printf "checking for %s... " "$1" >&2
+ printf "checking %s... " "$1" >&2
}
check() {
- checking "$1"
+ checking "for $1"
var="${VAR:-${1^^}}"
cmd="${!var}"
: ${cmd:=${1}}
@@ -15,16 +15,19 @@ check() {
get=$(command -v "${cmd}")
e=$?
if [[ -n "$get" ]]; then
+ declare -g "$var=$get"
+ echo ${get}
if [[ -z "$NO_RUN" ]]; then
+ checking "${get} usability"
${get} -h >/dev/null 2>&1
e=$?
if (( $e )); then
echo unusable, returned $e
return $e
+ else
+ echo yes
fi
fi
- declare -g "$var=$get"
- echo ${get}
# intentionally stripping whitespace
echo ${var} := ${get} ${varflags} >> "${OUT}" || exit 1
else
@@ -39,7 +42,7 @@ rcheck() {
fcheck() {
for f in $3; do
- checking "$f $1 support in ffmpeg"
+ checking "for $f $1 support in ffmpeg"
if grep -Eq "^ $2 $f " <<< "$4"; then
echo yes
else
@@ -49,6 +52,19 @@ fcheck() {
done
}
+echeck() {
+ checking "for $2"
+ if [ "$1" "$2" ]; then
+ echo found
+ else
+ echo "$2 is missing; make sure you have $3" >&2
+ exit 1
+ fi
+}
+
+echeck -f ast2json/script-a1-monday.rpyc "copied the rpyc files"
+echeck -d www/dump "you have extracted the rpa"
+
OUT=Makefile.inc
> "${OUT}" || exit 1