Drop usage of `` in if statements
Subshells are not required for if statements, so remove them. This also drops all usage of `` in scripts. Change-Id: I44c476ddfb67e5b3ebd3aaba3b26561f02708477
This commit is contained in:
@@ -206,10 +206,10 @@ EOF
|
|||||||
# 3) no -2 by reviewers
|
# 3) no -2 by reviewers
|
||||||
# 4) no Workflow -1 (WIP)
|
# 4) no Workflow -1 (WIP)
|
||||||
#
|
#
|
||||||
if `echo $change_info|grep -q '{"type":"Workflow","description":"Workflow","value":"1"'` \
|
if echo $change_info|grep -q '{"type":"Workflow","description":"Workflow","value":"1"' \
|
||||||
&& ! `echo $change_info|grep -q '{"type":"Verified","description":"Verified","value":"-[12]","grantedOn":[0-9]*,"by":{"name":"Jenkins","username":"jenkins"}}'` \
|
&& ! echo $change_info|grep -q '{"type":"Verified","description":"Verified","value":"-[12]","grantedOn":[0-9]*,"by":{"name":"Jenkins","username":"jenkins"}}' \
|
||||||
&& ! `echo $change_info|grep -q '{"type":"Code-Review","description":"Code-Review","value":"-2"'` \
|
&& ! echo $change_info|grep -q '{"type":"Code-Review","description":"Code-Review","value":"-2"' \
|
||||||
&& ! `echo $change_info|grep -q '{"type":"Workflow","description":"Workflow","value":"-1"'` ; then
|
&& ! echo $change_info|grep -q '{"type":"Workflow","description":"Workflow","value":"-1"' ; then
|
||||||
echo "Job already approved, exiting"
|
echo "Job already approved, exiting"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ echo "======================================================================"
|
|||||||
|
|
||||||
if [ -z "$ZUUL_REFNAME" ] || [ "$ZUUL_REFNAME" == "master" ] ; then
|
if [ -z "$ZUUL_REFNAME" ] || [ "$ZUUL_REFNAME" == "master" ] ; then
|
||||||
: # Leave the docs where they are.
|
: # Leave the docs where they are.
|
||||||
elif `echo $ZUUL_REFNAME | grep refs/tags/ >/dev/null` ; then
|
elif echo $ZUUL_REFNAME | grep refs/tags/ >/dev/null ; then
|
||||||
# Put tagged releases in proper location. All tagged builds get copied to
|
# Put tagged releases in proper location. All tagged builds get copied to
|
||||||
# BUILD_DIR/tagname. If this is the latest tagged release the copy of files
|
# BUILD_DIR/tagname. If this is the latest tagged release the copy of files
|
||||||
# at BUILD_DIR remains. When Jenkins copies this file the root developer
|
# at BUILD_DIR remains. When Jenkins copies this file the root developer
|
||||||
@@ -52,7 +52,7 @@ elif `echo $ZUUL_REFNAME | grep refs/tags/ >/dev/null` ; then
|
|||||||
mv doc/build/$TAG doc/build/html/$TAG
|
mv doc/build/$TAG doc/build/html/$TAG
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
elif `echo $ZUUL_REFNAME | grep stable/ >/dev/null` ; then
|
elif echo $ZUUL_REFNAME | grep stable/ >/dev/null ; then
|
||||||
# Put stable release changes in dir named after stable release under the
|
# Put stable release changes in dir named after stable release under the
|
||||||
# build dir. When Jenkins copies these files they will be accessible under
|
# build dir. When Jenkins copies these files they will be accessible under
|
||||||
# the developer docs root using the stable release's name.
|
# the developer docs root using the stable release's name.
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
# The script is to push the updated English po to Transifex.
|
# The script is to push the updated English po to Transifex.
|
||||||
|
|
||||||
if [ ! `echo $ZUUL_REFNAME | grep master` ]; then
|
if ! echo $ZUUL_REFNAME | grep master; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ python setup.py extract_messages
|
|||||||
# Add all changed files to git
|
# Add all changed files to git
|
||||||
git add openstack_auth/locale/*
|
git add openstack_auth/locale/*
|
||||||
|
|
||||||
if [ ! `git diff-index --quiet HEAD --` ]; then
|
if ! git diff-index --quiet HEAD --; then
|
||||||
# Push .pot changes to transifex
|
# Push .pot changes to transifex
|
||||||
tx --debug --traceback push -s
|
tx --debug --traceback push -s
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
PROJECT="horizon"
|
PROJECT="horizon"
|
||||||
|
|
||||||
if [ ! `echo $ZUUL_REFNAME | grep master` ]; then
|
if ! echo $ZUUL_REFNAME | grep master; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
PROJECT=$1
|
PROJECT=$1
|
||||||
|
|
||||||
if [ ! `echo $ZUUL_REFNAME | grep master` ]; then
|
if ! echo $ZUUL_REFNAME | grep master; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ extract_messages_log "$PROJECT"
|
|||||||
# Add all changed files to git
|
# Add all changed files to git
|
||||||
git add $PROJECT/locale/*
|
git add $PROJECT/locale/*
|
||||||
|
|
||||||
if [ ! `git diff-index --quiet HEAD --` ]; then
|
if ! git diff-index --quiet HEAD --; then
|
||||||
# Push .pot changes to transifex
|
# Push .pot changes to transifex
|
||||||
|
|
||||||
# Transifex project name does not include "."
|
# Transifex project name does not include "."
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
PROJECT=$1
|
PROJECT=$1
|
||||||
|
|
||||||
if [ ! `echo $ZUUL_REFNAME | grep master` ]; then
|
if ! echo $ZUUL_REFNAME | grep master; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ setup_translation
|
|||||||
|
|
||||||
setup_manuals "$PROJECT"
|
setup_manuals "$PROJECT"
|
||||||
|
|
||||||
if [ ! `git diff --cached --quiet HEAD --` ]; then
|
if ! git diff --cached --quiet HEAD --; then
|
||||||
# Push .pot changes to transifex
|
# Push .pot changes to transifex
|
||||||
tx --debug --traceback push -s
|
tx --debug --traceback push -s
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user