source: build-files/freebsd-update/scripts/multi.sh @ 635dc54

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2releng/10.0.3releng/10.1
Last change on this file since 635dc54 was 635dc54, checked in by Kris Moore <kris@…>, 17 months ago

Add our freebsd-update code to GIT

This will become a dumping ground for mods we may make to the freebsd-update
build process, as well as the specific patches we have going into a release

  • Property mode set to 100755
File size: 2.4 KB
Line 
1#!/bin/sh -e
2
3#-
4# Copyright 2006 Colin Percival
5# All rights reserved
6#
7# Redistribution and use in source and binary forms, with or without
8# modification, are permitted providing that the following conditions
9# are met:
10# 1. Redistributions of source code must retain the above copyright
11#    notice, this list of conditions and the following disclaimer.
12# 2. Redistributions in binary form must reproduce the above copyright
13#    notice, this list of conditions and the following disclaimer in the
14#    documentation and/or other materials provided with the distribution.
15#
16# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
20# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
24# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
25# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26# POSSIBILITY OF SUCH DAMAGE.
27
28# $FreeBSD: user/cperciva/freebsd-update-build/scripts/multi.sh 247826 2013-03-05 00:52:14Z cperciva $
29
30# Script for doing the same operation (init / approve / diff / upload)
31# to multiple releases.  This helps avoid typos at the command line
32# when the same security patch needs to be applied to half a dozen
33# releases...
34
35. `dirname $0`/build.subr
36readglobalconfig
37makeglobaldirs
38
39# Make sure we have the right number of arguments
40if [ $# -ne 3 ]; then
41        echo "usage: $0 script \"i386 ...\" \"5.5-RELEASE ...\""
42        exit 1
43fi
44
45SCRIPT=$1; shift
46TARGETS=$1; shift
47RELEASES=$1; shift
48
49SCRIPTPATH="${SCRIPTDIR}/${SCRIPT}.sh"
50
51# Make sure the script is something sensible
52if ! [ -x ${SCRIPTPATH} ]; then
53        echo "${SCRIPTPATH} does not exist or is not executable"
54        exit 1
55fi
56
57# Do the work, and log output into ${BASEDIR}/logs.  While the
58# output produced from these scripts (e.g., filestamps) can be
59# obtained from ${WORKDIR}, it's best if the information doesn't
60# get lost to scrolling windows in the first place.
61for TARGET in ${TARGETS}; do
62        for RELEASE in ${RELEASES}; do
63                ${SCRIPTPATH} ${TARGET} ${RELEASE} |
64                    tee ${BASEDIR}/logs/${SCRIPT}-${TARGET}-${RELEASE}
65        done
66done
Note: See TracBrowser for help on using the repository browser.