#!/bin/bash set -e # # Copyright 2007,2008 Neil Williams # # This package is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # if [ -z "$YESNO" ]; then YESNO=$"yYnN" fi cat <&3 echo "-- apt-cache policy --" >&3 echo >&3 apt-cache policy >&3 2>&1 else echo >&3 echo "-- apt-cache policy request denied --" >&3 echo >&3 fi if [ -f /etc/apt/sources.list ]; then yesno "May I also include your sources.lists (/etc/apt/sources.list*(.d/*))? " yep if [ "$REPLY" = "yep" ]; then echo >&3 echo "-- /etc/apt/sources.list --" >&3 echo >&3 cat /etc/apt/sources.list >&3 for list in `ls /etc/apt/sources.list.d/ | grep -v ucf`; do echo >&3 echo "-- /etc/apt/sources.list.d/$list --" >&3 echo >&3 cat /etc/apt/sources.list.d/$list >&3 done fi fi