#!/bin/sh
# -*- coding: utf-8; indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
# vim:fileencodings=utf-8:expandtab:tabstop=4:shiftwidth=4:softtabstop=4

set -x

#restore sources lists backuped in volatile-task.
for f in $(find /etc/apt/ -type f -name "*.volatile")
do
    echo "$f"
    mv "$f" "${f%%.volatile}".list
done
        
# Remove the cached lists to avoid confusing. (LP: #1291747)
rm -fr /var/lib/apt/lists/*
apt-get check
