Merge "Store build-time settings"

This commit is contained in:
Jenkins 2013-04-04 20:56:22 +00:00 committed by Gerrit Code Review
commit a400a5e00a
3 changed files with 25 additions and 0 deletions

View file

@ -21,6 +21,10 @@ set -e
# of $LANG varying between build hosts # of $LANG varying between build hosts
export LANG=C export LANG=C
# Store our initial environment and command line args for later
export DIB_ARGS="$@"
export DIB_ENV=$(export)
SCRIPTNAME=$(basename $0) SCRIPTNAME=$(basename $0)
SCRIPT_HOME=$(dirname $0) SCRIPT_HOME=$(dirname $0)
export _LIB=$(dirname $0)/../lib export _LIB=$(dirname $0)/../lib

View file

@ -0,0 +1,9 @@
#!/bin/bash
# Store the build-time environment and command line arguments
set -e
source $_LIB/die
[ -n "$TMP_HOOKS_PATH." ] || die "Temp hook path not set"
echo "$DIB_ENV" > $TMP_HOOKS_PATH/dib_environment
echo "$DIB_ARGS" > $TMP_HOOKS_PATH/dib_arguments

View file

@ -0,0 +1,12 @@
#!/bin/bash
# Store build-time environment and command line arguments
set -e
if [ -e "/tmp/in_target.d/dib_environment" ]; then
cp /tmp/in_target.d/dib_environment /etc/
fi
if [ -e "/tmp/in_target.d/dib_arguments" ]; then
cp /tmp/in_target.d/dib_arguments /etc/
fi