source: rtems/contrib/mingw/upload.sh @ f6cd0db

4.104.114.84.95
Last change on this file since f6cd0db was f6cd0db, checked in by Chris Johns <chrisj@…>, on Jul 28, 2007 at 8:31:57 AM

2007-07-28 Chris Johns <chisj@…>

  • README, build-rpms.sh, rtems.ini, build-exes.sh, rtems-tools.nsi: Updated to the new 4.8 build plus a new installer.
  • autoconf.def, automake.def, ba-wrap.sh, build-autotools.sh, msys-path.nsi, rtems-autotools.nsi, target-section-text, upload.sh, version: New to version 4.8. Autotools is built when installing.
  • Property mode set to 100755
File size: 1.7 KB
Line 
1#! /bin/sh
2
3# $Id$
4#
5# RTEMS Installers and Source Upload script.
6#
7# This script copies the executable and source to the RTEMS FTP server. It is for
8# use on the RTEMS build server.
9#
10
11echo $0 $*
12
13source=$(dirname $0)
14top=$(pwd)
15
16terminate()
17{
18  echo "error: $*" >&2
19  exit 1
20}
21
22check()
23{
24  if [ $? -ne 0 ]; then
25    terminate
26  fi
27}
28
29. $source/version
30
31ftpbase=none
32prefix=none
33
34while [ $# -gt 0 ];
35do
36  case $1 in
37    -b)
38      shift
39      tool_build=$1
40      ;;
41    -d)
42      set -x
43      ;;
44    -f)
45      shift
46      ftpbase=$1
47      ;;
48    -p)
49      shift
50      prefix=$1
51      ;;
52    -v)
53      shift
54      version=$1
55      ;;
56    --help)
57      echo "$0 -d -b <build> -f <ftpbase> -p <prefix> -v <version>"
58      exit 2
59      ;;
60    *)
61      terminate "error: invalid option (try --help): $1"
62      ;;
63  esac
64  shift
65done
66
67if [ $ftpbase = none ]; then
68  terminate "no ftpbase set"
69fi
70
71if [ $prefix = none ]; then
72  terminate "no prefix set"
73fi
74
75exebase=${prefix}/${version}/packages/mingw32/exe
76srcbase=${prefix}/${version}/packages/mingw32/SRPMS
77
78mkdir -p ${ftpbase}/${version}/build-${tool_build}/source
79check "creating: ${ftpbase}/${version}/build-${tool_build}/source"
80
81exes=$(find $exebase -name \*.exe)
82for e in $exes
83do
84  echo "cp $e ${ftpbase}/${version}/build-${tool_build}/."
85  cp $e ${ftpbase}/${version}/build-${tool_build}/.
86  check "coping installer: $e"
87done
88
89cd ${ftpbase}/${version}/build-${tool_build}/source
90check "change directory: ${ftpbase}/${version}/build-${tool_build}/source"
91
92for s in ${srcbase}/*.rpm
93do
94  echo "rpm2cpio $s | cpio --extract --quiet"
95  rpm2cpio $s | cpio --extract --quiet
96  check "RPM to CPIO and CPIO Copy-In failed"
97done
98
99rm -f *.spec
100check "deleting spec files"
101
102cd $top
103
104exit 0
Note: See TracBrowser for help on using the repository browser.