summaryrefslogtreecommitdiffstats
path: root/contrib/mingw/upload.sh
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2007-07-28 08:31:57 +0000
committerChris Johns <chrisj@rtems.org>2007-07-28 08:31:57 +0000
commitf6cd0dbeadb89f13c616bc3bce19fad59093759b (patch)
tree55f32d8ae20ca7d97550213553a8379f5cfb0d2e /contrib/mingw/upload.sh
parent2007-07-28 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-f6cd0dbeadb89f13c616bc3bce19fad59093759b.tar.bz2
2007-07-28 Chris Johns <chisj@rtems.org>
* 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.
Diffstat (limited to '')
-rwxr-xr-xcontrib/mingw/upload.sh104
1 files changed, 104 insertions, 0 deletions
diff --git a/contrib/mingw/upload.sh b/contrib/mingw/upload.sh
new file mode 100755
index 0000000000..be0cd4a4a5
--- /dev/null
+++ b/contrib/mingw/upload.sh
@@ -0,0 +1,104 @@
+#! /bin/sh
+
+# $Id$
+#
+# RTEMS Installers and Source Upload script.
+#
+# This script copies the executable and source to the RTEMS FTP server. It is for
+# use on the RTEMS build server.
+#
+
+echo $0 $*
+
+source=$(dirname $0)
+top=$(pwd)
+
+terminate()
+{
+ echo "error: $*" >&2
+ exit 1
+}
+
+check()
+{
+ if [ $? -ne 0 ]; then
+ terminate
+ fi
+}
+
+. $source/version
+
+ftpbase=none
+prefix=none
+
+while [ $# -gt 0 ];
+do
+ case $1 in
+ -b)
+ shift
+ tool_build=$1
+ ;;
+ -d)
+ set -x
+ ;;
+ -f)
+ shift
+ ftpbase=$1
+ ;;
+ -p)
+ shift
+ prefix=$1
+ ;;
+ -v)
+ shift
+ version=$1
+ ;;
+ --help)
+ echo "$0 -d -b <build> -f <ftpbase> -p <prefix> -v <version>"
+ exit 2
+ ;;
+ *)
+ terminate "error: invalid option (try --help): $1"
+ ;;
+ esac
+ shift
+done
+
+if [ $ftpbase = none ]; then
+ terminate "no ftpbase set"
+fi
+
+if [ $prefix = none ]; then
+ terminate "no prefix set"
+fi
+
+exebase=${prefix}/${version}/packages/mingw32/exe
+srcbase=${prefix}/${version}/packages/mingw32/SRPMS
+
+mkdir -p ${ftpbase}/${version}/build-${tool_build}/source
+check "creating: ${ftpbase}/${version}/build-${tool_build}/source"
+
+exes=$(find $exebase -name \*.exe)
+for e in $exes
+do
+ echo "cp $e ${ftpbase}/${version}/build-${tool_build}/."
+ cp $e ${ftpbase}/${version}/build-${tool_build}/.
+ check "coping installer: $e"
+done
+
+cd ${ftpbase}/${version}/build-${tool_build}/source
+check "change directory: ${ftpbase}/${version}/build-${tool_build}/source"
+
+for s in ${srcbase}/*.rpm
+do
+ echo "rpm2cpio $s | cpio --extract --quiet"
+ rpm2cpio $s | cpio --extract --quiet
+ check "RPM to CPIO and CPIO Copy-In failed"
+done
+
+rm -f *.spec
+check "deleting spec files"
+
+cd $top
+
+exit 0