[9f64a70] | 1 | #! /bin/sh -x |
---|
| 2 | # |
---|
| 3 | # This script supports the cut_release by performing module specific |
---|
| 4 | # answers and answering module specific questions. |
---|
| 5 | # |
---|
| 6 | # Module: RTEMS |
---|
| 7 | # |
---|
| 8 | # $Id$ |
---|
| 9 | # |
---|
| 10 | |
---|
| 11 | usage() |
---|
| 12 | { |
---|
| 13 | echo $* |
---|
| 14 | exit 1 |
---|
| 15 | } |
---|
| 16 | |
---|
| 17 | if test $# -lt 1 ; then |
---|
| 18 | usage "not enough arguments." |
---|
| 19 | fi |
---|
| 20 | |
---|
[1e0d481] | 21 | user_name=`grep ^$LOGNAME /etc/passwd | cut -d':' -f5 | cut -d',' -f1` |
---|
| 22 | # If you don't have user information, then we won't commit anything. |
---|
| 23 | if test "X${user_name}" = "X" ; then |
---|
| 24 | echo "User information not set" |
---|
| 25 | usage |
---|
| 26 | fi |
---|
[9f64a70] | 27 | case $1 in |
---|
| 28 | name) |
---|
| 29 | echo "RTEMS" |
---|
| 30 | ;; |
---|
| 31 | pretag) |
---|
| 32 | release_name=$2 |
---|
| 33 | current=$3 |
---|
[69544b5] | 34 | currentdir=`pwd` |
---|
| 35 | for version_dir in . cpukit c/src testsuites |
---|
[9f64a70] | 36 | do |
---|
[69544b5] | 37 | cd ${currentdir}/${version_dir} |
---|
| 38 | cat << EOF > aclocal/version.m4 |
---|
[9f64a70] | 39 | AC_DEFUN([RTEMS_VERSIONING], |
---|
| 40 | m4_define([_RTEMS_VERSION],[${current}])) |
---|
| 41 | EOF |
---|
[69544b5] | 42 | ( \ |
---|
| 43 | echo `date +"%Y-%m-%d"`" ${user_name}" ; |
---|
| 44 | echo ; |
---|
| 45 | echo " * aclocal/version.m4: Updated to ${release_name}-${current}." ; |
---|
| 46 | echo \ |
---|
| 47 | ) >YYY |
---|
| 48 | cat YYY ChangeLog >XXX |
---|
| 49 | mv XXX ChangeLog |
---|
| 50 | cvs commit -F YYY ChangeLog aclocal/version.m4 |
---|
| 51 | rm -f YYY |
---|
[9f64a70] | 52 | done |
---|
[69544b5] | 53 | cd ${currentdir} |
---|
[9f64a70] | 54 | ;; |
---|
| 55 | postexport) |
---|
| 56 | # In order to prevent end users from having to have "developer" tools |
---|
| 57 | # like automake and autoconf, we need to ensure that the following |
---|
| 58 | # timestamp relationships hold: |
---|
| 59 | # |
---|
| 60 | # + configure is newer than configure.in |
---|
| 61 | # + aclocal.m4 is newer than the aclocal macros it uses |
---|
| 62 | # + Makefile.in is newer than Makefile.am |
---|
| 63 | # |
---|
| 64 | # This regenerates all automatically generated files and ensures that |
---|
| 65 | # timestamp relationships are correct. |
---|
| 66 | # |
---|
| 67 | # NOTE: The standard way of doing this is to have a script named |
---|
| 68 | # bootstrap at the top level. |
---|
| 69 | # |
---|
| 70 | ./bootstrap |
---|
| 71 | # now make sure the files generated by rpcgen are OK. |
---|
| 72 | touch c/src/librdbg/src/*/*/remdeb*.[hc] |
---|
| 73 | # now remove left overs from auto* -- they take 2MB even with bzip |
---|
| 74 | find . -name autom4te.cache -print | xargs -e rm -rf |
---|
| 75 | ;; |
---|
| 76 | aftertar) |
---|
| 77 | current=$2 |
---|
| 78 | reldir_curr=$3 |
---|
| 79 | module_name=rtems |
---|
| 80 | ( echo |
---|
| 81 | echo "This file contains configuration information on the " |
---|
| 82 | echo "primary computer used to test and make the ${current}" |
---|
| 83 | echo "version of ${module_name}." |
---|
| 84 | echo |
---|
| 85 | echo "OS Version: " `head -1 /etc/issue` |
---|
| 86 | echo |
---|
| 87 | echo "The following RTEMS RPMs were installed on the machine" |
---|
| 88 | echo "where this release was made:" |
---|
| 89 | rpm -q -g RTEMS/4.7 | sed -e 's/^/ /' |
---|
| 90 | echo |
---|
| 91 | ) >${reldir_curr}/TOOL_VERSIONS |
---|
| 92 | ;; |
---|
| 93 | *) |
---|
| 94 | usage "$1 is not a valid subcommand." |
---|
| 95 | ;; |
---|
| 96 | esac |
---|
| 97 | |
---|
| 98 | exit 0 |
---|