|
10 | 10 | # BASH_VERSION can be set in some shells; instead, verify declare -A works. |
11 | 11 | if ! (declare -A __test_assoc 2>/dev/null); then |
12 | 12 | echo "This script requires bash. Checking if you have it..." |
13 | | - bash=`which bash` |
| 13 | + bash=$(which bash) |
14 | 14 | if [ -n "$bash" ] && [ -x "$bash" ]; then |
15 | 15 | echo "Found bash at $bash. Re-running script with bash..." |
16 | 16 | echo |
|
24 | 24 | # Source common Docker script checks and functions |
25 | 25 | source "$(dirname "$0")/common.sh" |
26 | 26 |
|
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\.@@') |
28 | 28 | PS3="Choose an image to build or CTRL-C to abort: " |
29 | 29 | select IMAGE in "All images" $FILES; do |
30 | 30 | CACHE="" |
@@ -52,7 +52,7 @@ select IMAGE in "All images" $FILES; do |
52 | 52 | # a code based on today's date, then attempt to pull it from DockerHub. If |
53 | 53 | # we successfully pull, then it already exists, and we bump the interation |
54 | 54 | # number on the end. |
55 | | - DATE=`date +"%Y%m%d"` |
| 55 | + DATE=$(date +"%Y%m%d") |
56 | 56 | ITER=1 |
57 | 57 | $DOCKER pull bugzilla/${IMAGE}:${DATE}.${ITER} >/dev/null 2>/dev/null |
58 | 58 | while [ $? == 0 ]; do |
@@ -122,16 +122,16 @@ select IMAGE in "All images" $FILES; do |
122 | 122 |
|
123 | 123 | # check if the user is logged in |
124 | 124 | if [ -z "$PYTHON" ]; then |
125 | | - PYTHON=`which python` |
| 125 | + PYTHON=$(which python) |
126 | 126 | fi |
127 | 127 | if [ -z "$PYTHON" ]; then |
128 | | - PYTHON=`which python3` |
| 128 | + PYTHON=$(which python3) |
129 | 129 | fi |
130 | 130 | if [ ! -x "$PYTHON" ]; then |
131 | 131 | echo "The python executable specified in your PYTHON environment value or your PATH is not executable or I can't find it." |
132 | 132 | exit -1 |
133 | 133 | 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']))") |
135 | 135 | if [ $AUTHINFO -gt 0 ]; then |
136 | 136 | # user is logged in |
137 | 137 | echo |
|
0 commit comments