makedist/obsoleted/make_media_set.sh

58 lines
1.2 KiB
Bash
Raw Normal View History

2011-05-04 02:30:35 +02:00
#!/bin/bash
#
# Make Media set for a specific target
# Copyright (c) 2006 by Silvan Calarco <silvan.calarco@qilinux.it>
#
# Usage:
# ./make_media_set.sh BRANCH MEDIA PLATFORM TARGET
. ./VERSION
. ./functions.inc.sh
. ./defs.inc.sh
[ $3 ] || {
echo "Usage:"
echo "./make_media_set.sh BRANCH TARGET PLATFORM"
echo
exit 1
}
BRANCH=$1
TARGET=$2
PLATFORM=$3
TARGETDIR=$TOPDIR/targets/$TARGET
[ -e $TARGETDIR/settings.inc ] || {
echo "Error: missing target settings file $TARGETDIR/settings.inc; aborting."
echo
exit 1
}
. $TARGETDIR/settings.inc
[ "$DISKSLIST" ] || {
echo "Error: no disks set defined for target, is $TARGET a distribution? Aborting."
echo
exit 1
}
echo "Building whole media set for distribution $TARGET"
echo
echo " * platform : $PLATFORM"
echo " * codename : $CODENAME"
echo " * disks list: $DISKSLIST"
echo
##make BRANCH=$BRANCH UPDATE=setup,rpms,lists PLATFORM=free MEDIA=cd1 qilinux
MAKE_EXTRA="UPDATE=setup,rpms,lists"
echo $MAKE_EXTRA
for media in $DISKSLIST; do
make BRANCH=$BRANCH $MAKE_EXTRA MEDIA=$media PLATFORM=$PLATFORM $TARGET || {
echo "Error executing make BRANCH=$BRANCH $MAKE_EXTRA MEDIA=$media PLATFORM=$PLATFORM $TARGET. Aborting."
exit 1
}
unset MAKE_EXTRA
done