version: 2
jobs:
  build:
    working_directory: ~/linter-gfortran
    docker:
      - image: particlekit/ubuntu-gfortran:latest
        environment:
          DISPLAY: ":99"
    steps:
      - run: apt-get update
      # Install some pre-requisite packages and missing dependencies from the atom package
      - run: apt-get --assume-yes --quiet install curl sudo gfortran-5 libxss1 libasound2 xvfb
      # Fire up a VFB to run Atom in
      - run: /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16
      - checkout
      # Download and run the (modified) Atom CI script
      - run: curl -s -O https://raw.githubusercontent.com/Arcanemagus/ci/atomlinter/build-package.sh
      - run: chmod u+x build-package.sh
      - run: ./build-package.sh

version: 2
jobs:
  build:
    working_directory: ~/linter-gfortran
    docker:
      - image: particlekit/ubuntu-gfortran:latest
        environment:
          DISPLAY: ":99"
    steps:
      - run: sed -i -re 's/([a-z]{2}\.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
      - run: apt-get update
      # Install some pre-requisite packages and missing dependencies from the atom package
      - run: apt-get --assume-yes --quiet install curl sudo gfortran-5 libxss1 libasound2 xvfb
      # Fire up a VFB to run Atom in
      - run: /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16
      - checkout
      # Download and run the (modified) Atom CI script
      - run: curl -s -O https://raw.githubusercontent.com/Arcanemagus/ci/atomlinter/build-package.sh
      - run: chmod u+x build-package.sh
      - run: ./build-package.sh

Fix for Ubuntu 16.10 EOL
Fix for Ubuntu 16.10 EOL

We change sources from archive.ubuntu.com and security.ubuntu.com to old-releases.ubuntu.com 