gluon/scripts/site.sh
Daniel Ehlers bd28aa99ae Return exit code on missing value
Let the site configuration value script return 1 when
the requested value is not available.This enables us
to react on failures, so we can for example use a default
value.

With this patch the script will return with exitcode 1 if
the value is not found and no output on stdout. Otherwise
exitcode is 0 and the value is returned on stdout.
2014-05-09 13:38:26 +02:00

7 lines
176 B
Bash
Executable File

#!/bin/sh
export GLUONDIR="$(dirname "$0")/.."
RESULT=$(echo "@$1@" | $GLUONDIR/scripts/configure.pl $GLUONDIR/scripts/generate.pl)
test ! "$RESULT" = "@$1@" && echo $RESULT