X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=build.functions;h=a96e295ef66e50612eff65e37cc752acb0c81206;hb=refs%2Fheads%2F4.2;hp=8ab1c7ea72206292eab83b143e08a6a96426cb20;hpb=7a43677d05ede209fcc8315dff9d9c096387f86b;p=myplc.git diff --git a/build.functions b/build.functions index 8ab1c7e..a96e295 100644 --- a/build.functions +++ b/build.functions @@ -46,12 +46,15 @@ set -e # Be verbose set -x +# this is fragile, as the actual layout may vary from one mirror to the other +# however this should be in line with the layouts obtained +# when running build/vbuild-fedora-mirror.sh + function yum_conf_to_build_host () { - BUILD_HOST=$(hostname) + build_dir=$1; shift + BUILD_HOST=$(hostname) - case "$pl_DISTRO" in - Fedora) - cat < $php - -

Build-time error - could not locate documentation $html

-__header_no_doc__ + template=$build_dir/mirroring/${pl_DISTRO_NAME}/yum.repos.d/building.repo.in + if [ ! -f $template ] ; then + echo "# MyPLC/$0: cannot find template $template" else - # insert header, makes sure we have a trailing eol - (cat << __header_doc__ ; cat $html ) > $php - -__header_doc__ - # ignore ed return status - set +e - # cuts off around the - # preserves the 4 first lines that we just added as a header - ed -s $php << __ed_script__ -/BODY/ -/>/ -s,><,<, -5,-d -$ -?/BODY? -s,><.*,>, -+ -;d -w -q -__ed_script__ - set -e + sed -e s,@MIRRORURL@,http://${BUILD_HOST}/mirror/, $template fi -} +} +