set -u
authorChristoph Berg <myon@debian.org>
Wed, 20 Jan 2016 15:47:56 +0000 (16:47 +0100)
committerChristoph Berg <myon@debian.org>
Wed, 20 Jan 2016 15:47:56 +0000 (16:47 +0100)
jenkins/sbuild-update.sh

index 258eb5a2d5c3a74af4b4458de51ba9b7516cb8bb..fcabb8202fbb94c18e9568fb373da2f53f5f1c1c 100755 (executable)
@@ -78,8 +78,8 @@ umask 002
          precise|trusty|wily) # libossp-uuid is in universe on vivid+
            echo "deb $ubuntu $distribution universe" > /etc/apt/sources.list.d/universe.list ;;
        esac
-       if [ "$BACKPORTS" ]; then
-         echo "$BACKPORTS" > /etc/apt/sources.list.d/backports.list
+       if [ "${BACKPORTS:-}" ]; then
+         echo "${BACKPORTS:-}" > /etc/apt/sources.list.d/backports.list
          if [ -d /var/lib/apt/backports ]; then
            cp -al /var/lib/apt/backports/* /var/lib/apt/lists
          fi
@@ -89,7 +89,7 @@ umask 002
 
        # save backports lists
        rm -rf /var/lib/apt/backports /etc/apt/sources.list.d/backports.list.disabled
-       if [ "$BACKPORTS" ]; then
+       if [ "${BACKPORTS:-}" ]; then
          mv /etc/apt/sources.list.d/backports.list /etc/apt/sources.list.d/backports.list.disabled
          mkdir -p /var/lib/apt/backports
          mv /var/lib/apt/lists/*backports* /var/lib/apt/backports