source: rtems/contrib/mingw/build.sh @ 0e6d50c

4.104.114.95
Last change on this file since 0e6d50c was b7c9b29, checked in by Chris Johns <chrisj@…>, on 08/07/06 at 07:03:13

Log the script command lines.

  • Property mode set to 100755
File size: 1.5 KB
RevLine 
[808db8e]1#! /bin/sh
[332fd2a]2#
3# $Id$
4#
5# RTEMS Build script.
6#
7# This script builds the RPM files then the Windows executables.
8#
9# Note: This file should be placed in crossrpms.
10#
11
[808db8e]12command_line="$0 $*"
13
[332fd2a]14terminate()
15{
16  echo "error: $*" >&2
17  exit 1
[808db8e]18  echo "after"
[332fd2a]19}
20
21check()
22{
23 if [ $? -ne 0 ]; then
[808db8e]24  terminate $*
[332fd2a]25 fi
26}
27
28debug=
29hosts=
30prefix=
31no_run=
32relocate=
33source=
34targets=
35version=
36log=build.txt
37
38while [ $# -gt 0 ];
39do
40 case $1 in
41  -d)
42   set -x
43   debug="-d"
44   ;;
45  -h)
46   shift
47   hosts="-h $1"
48   ;;
49  -l)
50   shift
51   log=$1
52   ;;
53  -n)
54   no_run="-n"
55   ;;
56  -p)
57   shift
58   prefix="-p $1"
59   ;;
60  -r)
61   shift
62   relocation="-r $1"
63   ;;
64  -s)
65   shift
66   source="-s $1"
67   ;;
68  -t)
69   shift
70   targets="-t $1"
71   ;;
72  -v)
73   shift
74   version="-v $1"
75   ;;
76  --help)
77   echo "$0 -dn -h <hosts> -p <prefix> -s <source> -t <targets> -v <version>"
78   exit 2
79   ;;
80  *)
81   terminate "error: invalid option (try --help): $1"
82   ;;
83 esac
84 shift
85done
86
[808db8e]87echo "$command_line" > $log
88
[332fd2a]89scripts=$(dirname $0)
90
[b7c9b29]91echo "$scripts/build-rpms.sh -i $debug $no_run $prefix $source $targets $hosts $version" >> $log
[808db8e]92$scripts/build-rpms.sh -i $debug $no_run $prefix $source $targets $hosts $version 2>&1 | tee -a $log
93if [ ${PIPESTATUS[0]} -ne 0 ]; then
94 terminate "Making the RPM files."
95fi
[332fd2a]96
[b7c9b29]97echo "$scripts/build-exes.sh $debug $no_run $prefix $targets $relocation" >> $log
[332fd2a]98$scripts/build-exes.sh $debug $no_run $prefix $targets $relocation 2>&1 | tee -a $log
[808db8e]99if [ ${PIPESTATUS[0]} -ne 0 ]; then
100 terminate "Making the executable files."
101fi
[332fd2a]102
[808db8e]103exit 0
Note: See TracBrowser for help on using the repository browser.