Fix Early Use of die function in stack.sh
This commit fixes use of die function before it's defined. die function can be used after sourcing $TOP_DIR/functions chain- sources $TOP_DIR/functions-common. Because fixed portion of stack.sh checks existence of $TOP_DIR/inc and sourcing $TOP_DIR/function chain source $TOP_DIR/inc, this commit uses echo & exit command instead of die function. Closes-Bug: #1913021 Change-Id: I5ec174cf7b02269525b1bfd0bfa94ea889d16fce
This commit is contained in:
parent
84ead5aacf
commit
eef2a0d751
12
stack.sh
12
stack.sh
|
@ -96,19 +96,25 @@ fi
|
|||
# templates and other useful files in the ``files`` subdirectory
|
||||
FILES=$TOP_DIR/files
|
||||
if [ ! -d $FILES ]; then
|
||||
die $LINENO "missing devstack/files"
|
||||
set +o xtrace
|
||||
echo "missing devstack/files"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# ``stack.sh`` keeps function libraries here
|
||||
# Make sure ``$TOP_DIR/inc`` directory is present
|
||||
if [ ! -d $TOP_DIR/inc ]; then
|
||||
die $LINENO "missing devstack/inc"
|
||||
set +o xtrace
|
||||
echo "missing devstack/inc"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# ``stack.sh`` keeps project libraries here
|
||||
# Make sure ``$TOP_DIR/lib`` directory is present
|
||||
if [ ! -d $TOP_DIR/lib ]; then
|
||||
die $LINENO "missing devstack/lib"
|
||||
set +o xtrace
|
||||
echo "missing devstack/lib"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if run in POSIX shell
|
||||
|
|
Loading…
Reference in New Issue