#!/bin/bash

###########################################################################
#
# Baracus build and boot management framework
#
# Copyright (C) 2010 Novell, Inc, 404 Wyman Street, Waltham, MA 02451, USA.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the Artistic License 2.0, as published
# by the Perl Foundation, or the GNU General Public License 2.0
# as published by the Free Software Foundation; your choice.
#
# 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.  Both the Artistic
# Licesnse and the GPL License referenced have clauses with more details.
#
# You should have received a copy of the licenses mentioned
# along with this program; if not, write to:
#
# FSF, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110, USA.
# The Perl Foundation, 6832 Mulderstraat, Grand Ledge, MI 48837, USA.
#
###########################################################################

ISO=~baracus/isos/PSO_Agent-2.1.0-SLE11.x86_64.iso

MNT=/tmp/pso2.1

# RPO name is in the PSO modules - do not modify

RPO=psoagent_2.1-sle-11-x86_64 

#barepo remove $PSO
mkdir -p $MNT
mount -o loop $ISO $MNT
barepo create --repo $RPO --dist sles-11-x86_64
barepo add    --repo $RPO --dist sles-11-x86_64 --pac "`find $MNT/suse -name '*.rpm'`"
umount $MNT
rmdir  $MNT
