#!/bin/bash

set -e

if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
  # Remove config files from ucf database
  for FILE in apt/sources.list.d/dropbox.list  \
  apt/sources.list.d/google-chrome.list apt/sources.list.d/opera.list \
  apt/sources.list.d/virtualbox.list; do
    ucf --purge /etc/$FILE
    rm -rf /etc/$FILE
  done
fi
