#!/bin/sh
#
#	apply-sources-list, copies package lists from pen drive to
#	target system, [while on target system]
#
set -ex

if [ ! -f bin/apply-sources-list ]; then
    echo "aborted, we're not in an apt-walkabout instance"
    exit
fi

echo "WARNING: proceeding will adopt the standard sources.list"
read ok

# save existing sources list
cp /etc/apt/sources.list /etc/apt/sources.list.`date +%Y-%m-%d`

# overwrite the target system's sources.list with the standard list
cp etc/apt/sources.list /etc/apt/

# copy our package list to the target system
cp -r var/lib/apt/lists /var/lib/apt/
