Skip to content

Commit a914e33

Browse files
committed
Fixes according to output from shellcheck
* Added "!#" to top of files that didn't have it. * Added quotes around variables/commands as recommended * Changed some to be /bin/sh instead of /bin/bash for portability * removed -o pipefail, especiallly because the scripts seem to not have any piped commands, but also due to it being a bashism
1 parent 3dc7acc commit a914e33

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

build.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1+
#!/bin/sh
12
# XXX: TODO: we should make this include -e once tests pass
2-
set -xuo pipefail
3+
set -xu
34

45
DOCKER_IMAGE=jmadler/python-future-builder
56
# XXX: TODO: Perhaps this version shouldn't be hardcoded
67
version=0.18.3
78

8-
docker build . -t $DOCKER_IMAGE
9-
docker push $DOCKER_IMAGE:latest
9+
docker build . -t "$DOCKER_IMAGE"
10+
docker push "$DOCKER_IMAGE:latest"
1011

1112
for i in py26 py27 py33 py34 py35 py36 py37 py38 py39; do
12-
docker run -ti -v $(realpath dist):/root/python-future/dist $DOCKER_IMAGE /root/python-future/setup.sh $version $(basename $i)
13+
docker run -ti -v "$(realpath dist)":/root/python-future/dist "$DOCKER_IMAGE" /root/python-future/setup.sh "$version" "$i"
1314
done
1415

1516
python setup.py sdist

lint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/sh
12
# TODO: Run under Python 2.7 and 3.7
23
flake8 . --count --exit-zero --select=E901,E999,F821,F822,F823 --show-source --statistics || true
34
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics || true

setup.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
#!/bin/bash
1+
#!/bin/sh
22

3-
set -exo pipefail
3+
set -ex
44

55
version=$1
66
pytag=$2
77

8-
if [ $pytag = 'py33' ]; then
8+
if [ "$pytag" = 'py33' ]; then
99
pip3 install virtualenv==16.2.0
1010
fi
1111

12-
source /root/$pytag/bin/activate
12+
. /root/"$pytag"/bin/activate
1313

14-
if [ $pytag = 'py26' ]; then
14+
if [ "$pytag" = 'py26' ]; then
1515
pip install importlib
1616
fi
1717
pip install pytest unittest2
18-
python setup.py bdist_wheel --python-tag=$pytag
19-
pip install dist/future-$version-$pytag-none-any.whl
18+
python setup.py bdist_wheel --python-tag="$pytag"
19+
pip install "dist/future-$version-$pytag-none-any.whl"
2020
pytest tests/

0 commit comments

Comments
 (0)