-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakeRelease
executable file
·96 lines (69 loc) · 2.14 KB
/
MakeRelease
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/bin/sh
#
# $Id$
#
# Make Release - Creates an EPICS release
# By Matthew Needes and Bob Zieman
#
# MakeRelease [-b]
#
# [-b] - For fully built release
#
if [ ! -d src ]; then
echo "Cannot find src directory, are you at the top of EPICS base ?"
exit 1
fi
FULLY_BUILT=NO
if [ "${1}" = "-b" ]; then
FULLY_BUILT=YES
shift
if [ "${1}" != "." ]; then
echo "TOP: Cannot create a fully built release.";
exit 1;
fi
fi
# Retrieve EPICS release string from config/CONFIG_BASE_VERSION
. config/CONFIG_BASE_VERSION
if [ -z "${EPICS_VERSION}" ];
then
echo "TOP: Cannot retrieve release number from config/CONFIG_BASE_VERSION";
exit 1;
fi
RELS="R${EPICS_VERSION}.${EPICS_REVISION}.${EPICS_MODIFICATION}.${EPICS_UPDATE_NAME}${EPICS_UPDATE_LEVEL}";
echo TOP: Creating ../${RELS}.tar;
if [ -f ${RELS}.tar* ];
then
echo "TOP: This release has already been created.";
echo "TOP: Remove tar file or edit config/CONFIG_BASE_VERSION.";
exit 1;
fi
# Create list of files and dirs to include in tar file
cd ..
ls base/README* base/*.bat | xargs tar cvf ${RELS}.tar
ls base/Make* > /tmp/make_release.out.$$;
ls base/*COPYRIGHT* >> /tmp/make_release.out.$$;
if [ -d startup ];
then
find startup -name CVS -prune -o ! -type d -print \
>> /tmp/make_release.out.$$;
fi
# binary / library / default.dctsdr / <rec>Record.h / etc.
if [ $FULLY_BUILT = "YES" ];
then
find base/include -name CVS -prune -o ! -type d -print \
>> /tmp/make_release.out.$$;
find base/man -name CVS -prune -o ! -type d -print \
>> /tmp/make_release.out.$$;
find base/bin -name CVS -prune -o ! -type d -print \
>> /tmp/make_release.out.$$;
find base/lib -name CVS -prune -o ! -type d -print \
>> /tmp/make_release.out.$$;
find base/dbd -name CVS -prune -o ! -type d -print \
>> /tmp/make_release.out.$$;
fi
find base/config -name CVS -prune -o -name SCCS -prune -o ! -type d -print \
| grep -v '/O\..*$' >> /tmp/make_release.out.$$
find base/src -name CVS -prune -o -name SCCS -prune -o ! -type d -print \
| grep -v '/O\..*$' >> /tmp/make_release.out.$$
cat /tmp/make_release.out.$$ | xargs tar rvf ${RELS}.tar
rm /tmp/make_release.out.$$