source: rtems/contrib/mingw/build.sh @ 4390f3c9

4.115
Last change on this file since 4390f3c9 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
Line 
1#! /bin/sh
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
12command_line="$0 $*"
13
14terminate()
15{
16  echo "error: $*" >&2
17  exit 1
18  echo "after"
19}
20
21check()
22{
23 if [ $? -ne 0 ]; then
24  terminate $*
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
87echo "$command_line" > $log
88
89scripts=$(dirname $0)
90
91echo "$scripts/build-rpms.sh -i $debug $no_run $prefix $source $targets $hosts $version" >> $log
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
96
97echo "$scripts/build-exes.sh $debug $no_run $prefix $targets $relocation" >> $log
98$scripts/build-exes.sh $debug $no_run $prefix $targets $relocation 2>&1 | tee -a $log
99if [ ${PIPESTATUS[0]} -ne 0 ]; then
100 terminate "Making the executable files."
101fi
102
103exit 0
Note: See TracBrowser for help on using the repository browser.