Skip to content

Commit db7af9b

Browse files
committed
Change backticks to $()
1 parent 7c59c52 commit db7af9b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

docker/common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fi
3838

3939
# Find and validate the Docker executable
4040
if [ -z "$DOCKER" ]; then
41-
DOCKER=`which docker`
41+
DOCKER=$(which docker)
4242
fi
4343
if [ -n "$DOCKER" ] && [ ! -x "$DOCKER" ]; then
4444
echo

docker/gen-docker-image.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# BASH_VERSION can be set in some shells; instead, verify declare -A works.
1111
if ! (declare -A __test_assoc 2>/dev/null); then
1212
echo "This script requires bash. Checking if you have it..."
13-
bash=`which bash`
13+
bash=$(which bash)
1414
if [ -n "$bash" ] && [ -x "$bash" ]; then
1515
echo "Found bash at $bash. Re-running script with bash..."
1616
echo
@@ -24,7 +24,7 @@ fi
2424
# Source common Docker script checks and functions
2525
source "$(dirname "$0")/common.sh"
2626

27-
FILES=`ls -1 docker/images/Dockerfile.b* | grep -v '\.bak$' | sed -e 's@^docker/images/Dockerfile\.@@'`
27+
FILES=$(ls -1 docker/images/Dockerfile.b* | grep -v '\.bak$' | sed -e 's@^docker/images/Dockerfile\.@@')
2828
PS3="Choose an image to build or CTRL-C to abort: "
2929
select IMAGE in "All images" $FILES; do
3030
CACHE=""
@@ -52,7 +52,7 @@ select IMAGE in "All images" $FILES; do
5252
# a code based on today's date, then attempt to pull it from DockerHub. If
5353
# we successfully pull, then it already exists, and we bump the interation
5454
# number on the end.
55-
DATE=`date +"%Y%m%d"`
55+
DATE=$(date +"%Y%m%d")
5656
ITER=1
5757
$DOCKER pull bugzilla/${IMAGE}:${DATE}.${ITER} >/dev/null 2>/dev/null
5858
while [ $? == 0 ]; do
@@ -122,16 +122,16 @@ select IMAGE in "All images" $FILES; do
122122

123123
# check if the user is logged in
124124
if [ -z "$PYTHON" ]; then
125-
PYTHON=`which python`
125+
PYTHON=$(which python)
126126
fi
127127
if [ -z "$PYTHON" ]; then
128-
PYTHON=`which python3`
128+
PYTHON=$(which python3)
129129
fi
130130
if [ ! -x "$PYTHON" ]; then
131131
echo "The python executable specified in your PYTHON environment value or your PATH is not executable or I can't find it."
132132
exit -1
133133
fi
134-
AUTHINFO=`$PYTHON -c "import json; print(len(json.load(open('${HOME}/.docker/config.json','r',encoding='utf-8'))['auths']))"`
134+
AUTHINFO=$($PYTHON -c "import json; print(len(json.load(open('${HOME}/.docker/config.json','r',encoding='utf-8'))['auths']))")
135135
if [ $AUTHINFO -gt 0 ]; then
136136
# user is logged in
137137
echo

0 commit comments

Comments
 (0)