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 | |
---|
7 | usage() |
---|
8 | { |
---|
9 | echo $* |
---|
10 | exit 1 |
---|
11 | } |
---|
12 | |
---|
13 | if test $# -lt 1 ; then |
---|
14 | usage "not enough arguments." |
---|
15 | fi |
---|
16 | |
---|
17 | user_name=`grep ^$LOGNAME /etc/passwd | cut -d':' -f5 | cut -d',' -f1` |
---|
18 | # If you don't have user information, then we won't commit anything. |
---|
19 | if test "X${user_name}" = "X" ; then |
---|
20 | echo "User information not set" |
---|
21 | usage |
---|
22 | fi |
---|
23 | case $1 in |
---|
24 | name) |
---|
25 | echo "RTEMS" |
---|
26 | ;; |
---|
27 | pretag) |
---|
28 | release_name=$2 |
---|
29 | current=$3 |
---|
30 | currentdir=`pwd` |
---|
31 | for version_dir in . cpukit c/src testsuites |
---|
32 | do |
---|
33 | cd ${currentdir}/${version_dir} |
---|
34 | cat << EOF > aclocal/version.m4 |
---|
35 | AC_DEFUN([RTEMS_VERSIONING], |
---|
36 | m4_define([_RTEMS_VERSION],[${current}])) |
---|
37 | EOF |
---|
38 | ( \ |
---|
39 | echo `date +"%Y-%m-%d"`" ${user_name}" ; |
---|
40 | echo ; |
---|
41 | echo " * aclocal/version.m4: Updated to ${release_name}-${current}." ; |
---|
42 | echo \ |
---|
43 | ) >YYY |
---|
44 | cat YYY ChangeLog >XXX |
---|
45 | mv XXX ChangeLog |
---|
46 | cvs commit -F YYY ChangeLog aclocal/version.m4 |
---|
47 | rm -f YYY |
---|
48 | done |
---|
49 | cd ${currentdir} |
---|
50 | ;; |
---|
51 | postexport) |
---|
52 | # In order to prevent end users from having to have "developer" tools |
---|
53 | # like automake and autoconf, we need to ensure that the following |
---|
54 | # timestamp relationships hold: |
---|
55 | # |
---|
56 | # + configure is newer than configure.in |
---|
57 | # + aclocal.m4 is newer than the aclocal macros it uses |
---|
58 | # + Makefile.in is newer than Makefile.am |
---|
59 | # |
---|
60 | # This regenerates all automatically generated files and ensures that |
---|
61 | # timestamp relationships are correct. |
---|
62 | # |
---|
63 | # NOTE: The standard way of doing this is to have a script named |
---|
64 | # bootstrap at the top level. |
---|
65 | # |
---|
66 | ./bootstrap |
---|
67 | |
---|
68 | # now make sure the files generated by rpcgen are OK. |
---|
69 | # NOTE: With rdbg removed, there are no files to touch until |
---|
70 | # the NFS client build process is worked out. |
---|
71 | |
---|
72 | # now remove left overs from auto* -- they take 2MB even with bzip |
---|
73 | find . -name autom4te.cache -print | xargs -e rm -rf |
---|
74 | find . -name .cvsignore -print | xargs -e rm -rf |
---|
75 | ;; |
---|
76 | after_tar) |
---|
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 |
---|