#!/bin/bash # # Copyright (C) 2006 Brian Brazil # # This program 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 2 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, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # Generates an ISO with source packages for everytihng installed on the livecd # Assumes that gen-livecd has been run set -ex . config mkdir -p $LIVECDDIR-src/$DISTRONAME_L-cdsource-$RELEASE-$LIVECD_VERSION cd $LIVECDDIR-src/$DISTRONAME_L-cdsource-$RELEASE-$LIVECD_VERSION dpkg --admindir=$LIVECDDIR/chroot/var/lib/dpkg --get-selections | awk '$2 ~ /^install$/{print $1}END{print "'"$CDSOURCE_ADD"'"}' | xargs -- apt-get -o Dir::Etc::SourceList=$LIVECDDIR/sources.list \ -o Dir::State::Lists=$LIVECDDIR/chroot/var/lib/apt/lists \ -o Dir::State::status=$LIVECDDIR/chroot/var/lib/dpkg/status \ -o Dir::Cache=$LIVECDDIR/chroot/var/cache/apt/ -t $RELEASE \ --download-only source