openmamba-newrelease: support different distversions (milestone1,milestone2,..) and allow to continue build from a specified platform
This commit is contained in:
parent
0ee5676519
commit
3335e9f153
@ -1,25 +1,74 @@
|
||||
#!/bin/bash
|
||||
echo "openmamba media release script"
|
||||
echo "Copyright (c) 2008 by Silvan Calarco <silvan.calarco@mambasoft.it>"
|
||||
echo "Copyright (c) 2008-2011 by Silvan Calarco <silvan.calarco@mambasoft.it>"
|
||||
echo
|
||||
[ "$1" ] || {
|
||||
echo "Error: release not specified; aborting"
|
||||
|
||||
function usage()
|
||||
{
|
||||
echo "Usage:"
|
||||
echo "openmamba-newrelease [release]"
|
||||
echo "openmamba-newrelease release [distversion][-f][--from platform]"
|
||||
echo
|
||||
echo "-f: force full rebuild"
|
||||
echo "--from: continue from specified platform"
|
||||
echo "-h: show this help and exit"
|
||||
echo
|
||||
echo "Example:"
|
||||
echo "openmamba-newrelease 1.0pre5"
|
||||
echo
|
||||
}
|
||||
|
||||
[ "$1" ] || {
|
||||
echo "Error: release must be specified; aborting"
|
||||
usage
|
||||
exit 1
|
||||
}
|
||||
|
||||
sudo makedist openmamba-milestone1 PLATFORM=livecd FORCE=1 LANGUAGE=en
|
||||
sudo makedist openmamba-milestone1 PLATFORM=livecd FORCE=1 LANGUAGE=it
|
||||
sudo makedist openmamba-milestone1 PLATFORM=livecd SUBPLATFORM=livestudio-root FORCE=1 LANGUAGE=en
|
||||
sudo makedist openmamba-milestone1 PLATFORM=livecd SUBPLATFORM=livestudio-root FORCE=1 LANGUAGE=it
|
||||
sudo makedist openmamba-milestone1 PLATFORM=installdvd FORCE=1 LANGUAGE=en
|
||||
sudo makedist openmamba-milestone1 PLATFORM=installdvd FORCE=1 LANGUAGE=it
|
||||
sudo makedist openmamba-milestone1 PLATFORM=bootusb LANGUAGE=en
|
||||
sudo makedist openmamba-milestone1 PLATFORM=bootusb LANGUAGE=it
|
||||
while [ "$1" ]; do
|
||||
case $1 in
|
||||
-f) FORCE_ADD="FORCE=1" ;;
|
||||
--from) FROM_PLATFORM=$2; shift ;;
|
||||
-h) usage; exit 0 ;;
|
||||
-*) echo "Error: uknown option $1; aborting."
|
||||
exit 1
|
||||
;;
|
||||
*) if [ ! "$RELEASE" ]; then
|
||||
RELEASE=$1
|
||||
elif [ ! "$DISTVERSION" ]; then
|
||||
DISTVERSION=$2
|
||||
else
|
||||
echo "Error: exceeding option $1; aborting."
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
FORCE_OVERWRITE=1 RELEASE=$1 /etc/cron.daily/20-openmamba-autobuild-makedist
|
||||
[ "$RELEASE" ] || { usage; exit 1; }
|
||||
[ "$2" ] || DISTVERSION="milestone2"
|
||||
|
||||
. /etc/sysconfig/makedist
|
||||
|
||||
echo "Releasing media for openmamba $DISTVERSION $RELEASE"
|
||||
|
||||
ALLMEDIALAST=`expr ${#MEDIA_NAME[*]} - 1`
|
||||
for i in `seq 0 $ALLMEDIALAST`; do
|
||||
PLATFORM=${MEDIA_PLATFORM[i]/\/*/}
|
||||
[ ! "$FROM_PLATFORM" -o "$FROM_PLATFORM" = "$PLATFORM" ] || continue
|
||||
FROM_PLATFORM=
|
||||
SUBPLATFORM=${MEDIA_SUBPLATFORM[i]/*\//}
|
||||
[ "$SUBPLATFORM" = "$PLATFORM" ] && SUBPLATFORM=
|
||||
for lang in ${MEDIA_LANGUAGES[i]}; do
|
||||
for arch in ${MEDIA_ARCHS[i]}; do
|
||||
sudo makedist openmamba-$DISTVERSION PLATFORM=$PLATFORM SUBPLATFORM=$SUBPLATFORM LANGUAGE=$lang RELEASE=$DISTVERSION ARCH=$arch $FORCE_ADD || {
|
||||
echo "Error: fatal error creating medit openmamba-$DISTVERSION PLATFORM=$PLATFORM SUBPLATFORM=$SUBPLATFORM LANGUAGE=$lang RELEASE=$DISTVERSION $FORCE_ADD"
|
||||
exit 1
|
||||
}
|
||||
done
|
||||
done
|
||||
done
|
||||
|
||||
FORCE_OVERWRITE=1 RELEASE=$RELEASE DISTVERSION=$DISTVERSION /etc/cron.daily/20-openmamba-autobuild-makedist
|
||||
# Workaround: updates home page HTML which always show previous version after first run
|
||||
RELEASE=$RELEASE DISTVERSION=$DISTVERSION /etc/cron.daily/20-openmamba-autobuild-makedist
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user