Skip to content

Commit

Permalink
Use :- to avoid failure under set -u (Closes: #27)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Lamb <lamby@debian.org>
  • Loading branch information
lamby committed Oct 9, 2016
1 parent f7e5b08 commit d6140d7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions script.sh
Expand Up @@ -212,13 +212,13 @@ fi

EXTRA_PACKAGES=""

case "${TRAVIS_DEBIAN_EXTRA_REPOSITORY}" in
case "${TRAVIS_DEBIAN_EXTRA_REPOSITORY:-}" in
https:*)
EXTRA_PACKAGES="${EXTRA_PACKAGES} apt-transport-https"
;;
esac

if [ -n "${TRAVIS_DEBIAN_EXTRA_REPOSITORY_GPG_URL}" ]
if [ "${TRAVIS_DEBIAN_EXTRA_REPOSITORY_GPG_URL:-}" != "" ]
then
EXTRA_PACKAGES="${EXTRA_PACKAGES} wget gnupg"
fi
Expand All @@ -231,7 +231,7 @@ WORKDIR $(pwd)
COPY . .
EOF

if [ -n "${TRAVIS_DEBIAN_EXTRA_REPOSITORY_GPG_URL}" ]
if [ "${TRAVIS_DEBIAN_EXTRA_REPOSITORY_GPG_URL:-}" != "" ]
then
cat >>Dockerfile <<EOF
RUN wget -O- "${TRAVIS_DEBIAN_EXTRA_REPOSITORY_GPG_URL}" | apt-key add -
Expand All @@ -240,7 +240,7 @@ fi

# We're adding the extra repository only after the essential tools have been
# installed, so that we have apt-transport-https if the repository needs it.
if [ -n "${TRAVIS_DEBIAN_EXTRA_REPOSITORY}" ]
if [ "${TRAVIS_DEBIAN_EXTRA_REPOSITORY:-}" != "" ]
then
cat >>Dockerfile <<EOF
RUN echo "deb ${TRAVIS_DEBIAN_EXTRA_REPOSITORY}" >> /etc/apt/sources.list
Expand Down

0 comments on commit d6140d7

Please sign in to comment.