use . instead of source.

Code conventions: Use “.” to source script files
When you have to source a script file, for example ,
a credentials file to gain access to user-only or
 admin-only CLI commands, use . instead of source.
See more:
http://docs.openstack.org/contributor-guide/writing-style/code-conventions

Change-Id: Icaf20628e7b7480ee4ca4c85f9c5a3802b817070
This commit is contained in:
chao liu 2018-01-29 04:47:57 -08:00
parent ddfdb0c925
commit f580f0e713
4 changed files with 18 additions and 18 deletions

View File

@ -23,13 +23,13 @@ EXERCISE_DIR=$(cd $(dirname "$0") && pwd)
TOP_DIR=$(cd $EXERCISE_DIR/..; pwd)
# Import common functions
source $TOP_DIR/functions
. $TOP_DIR/functions
# Import configuration
source $TOP_DIR/openrc
. $TOP_DIR/openrc
# Import exercise configuration
source $TOP_DIR/exerciserc
. $TOP_DIR/exerciserc
is_service_enabled sahara || exit 55

View File

@ -2,10 +2,10 @@
set -o errexit
source $GRENADE_DIR/grenaderc
source $GRENADE_DIR/functions
. $GRENADE_DIR/grenaderc
. $GRENADE_DIR/functions
source $TOP_DIR/openrc admin admin
. $TOP_DIR/openrc admin admin
set -o xtrace

View File

@ -4,15 +4,15 @@
set -o errexit
source $GRENADE_DIR/grenaderc
source $GRENADE_DIR/functions
. $GRENADE_DIR/grenaderc
. $GRENADE_DIR/functions
# We need base DevStack functions for this
source $BASE_DEVSTACK_DIR/functions
source $BASE_DEVSTACK_DIR/stackrc # needed for status directory
. $BASE_DEVSTACK_DIR/functions
. $BASE_DEVSTACK_DIR/stackrc # needed for status directory
source $BASE_DEVSTACK_DIR/lib/tls
source ${GITDIR[sahara]}/devstack/plugin.sh
. $BASE_DEVSTACK_DIR/lib/tls
. ${GITDIR[sahara]}/devstack/plugin.sh
set -o xtrace

View File

@ -24,10 +24,10 @@ trap cleanup SIGHUP SIGINT SIGTERM
RUN_DIR=$(cd $(dirname "$0") && pwd)
# Source params
source $GRENADE_DIR/grenaderc
. $GRENADE_DIR/grenaderc
# Import common functions
source $GRENADE_DIR/functions
. $GRENADE_DIR/functions
# This script exits on an error so that errors don't compound and you see
# only the first error that occurred.
@ -37,10 +37,10 @@ set -o errexit
# ============
# Get functions from current DevStack
source $TARGET_DEVSTACK_DIR/stackrc
source $TARGET_DEVSTACK_DIR/lib/tls
source $(dirname $(dirname $BASH_SOURCE))/plugin.sh
source $(dirname $(dirname $BASH_SOURCE))/settings
. $TARGET_DEVSTACK_DIR/stackrc
. $TARGET_DEVSTACK_DIR/lib/tls
. $(dirname $(dirname $BASH_SOURCE))/plugin.sh
. $(dirname $(dirname $BASH_SOURCE))/settings
# Print the commands being run so that we can see the command that triggers
# an error. It is also useful for following allowing as the install occurs.