forked from schampeo/EnemieslistM4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release
executable file
·88 lines (60 loc) · 2.51 KB
/
release
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
#!/bin/sh
DIR=/web/enemieslist.com/devel/sendmail
cd ${DIR}
# get date
DATE=`/bin/date +"%Y%m%d"`
echo "preparing release for ${DATE}"
# echo new location to NOTES
echo "http://enemieslist.com/downloads/release.m4.tgz" \
"http://enemieslist.com/downloads/release-${DATE}.m4.tgz" \
\
>> ${DIR}/release-${DATE}.NOTES
# get last release date
LASTDATE=`/bin/ls -1 ${DIR}/tmp |sort -r |head -n1`
# make tmp directory
mkdir -p ${DIR}/tmp/${DATE}/enemieslist.com/dist/m4
# copy all EL*m4 files to tmp/DATE
cp ${DIR}/EL*m4 ${DIR}/tmp/${DATE}/enemieslist.com/dist/m4
# copy distro files to temp dir
cd ${DIR}/../../dist/
mkdir ${DIR}/tmp/${DATE}/enemieslist.com/dist/bin
cp ./bin/*sh ${DIR}/tmp/${DATE}/enemieslist.com/dist/bin
mkdir ${DIR}/tmp/${DATE}/enemieslist.com/dist/sbin
cp ./sbin/*sh ${DIR}/tmp/${DATE}/enemieslist.com/dist/sbin
mkdir ${DIR}/tmp/${DATE}/enemieslist.com/dist/doc
cp ./doc/{FILES,INSTALL} ${DIR}/tmp/${DATE}/enemieslist.com/dist/doc
mkdir ${DIR}/tmp/${DATE}/enemieslist.com/dist/etc
cp ./etc/{config,policy-dist,abusecontacts-dist} ${DIR}/tmp/${DATE}/enemieslist.com/dist/etc
mkdir ${DIR}/tmp/${DATE}/enemieslist.com/dist/var
cp ./var/*-dist ${DIR}/tmp/${DATE}/enemieslist.com/dist/var
cd ${DIR}
# check in all EL*.m4 files
cvs commit -m"checkin for release ${DATE}" EL*m4
# ??? in here we should build the auto-docs
# create the release tarball
cd ${DIR}/tmp/${DATE}
tar cvf ${DIR}/release-${DATE}.m4.tar ./enemieslist.com/dist/m4/EL*.m4
# In here we should bundle any utilities necessary for installation
# such as make-symlinks.sh, make-dbm-files.sh, and anything in /bin
tar rvf ${DIR}/release-${DATE}.m4.tar ./enemieslist.com/dist/bin
tar rvf ${DIR}/release-${DATE}.m4.tar ./enemieslist.com/dist/sbin
# documentation
tar rvf ${DIR}/release-${DATE}.m4.tar ./enemieslist.com/dist/doc/
# default policy
tar rvf ${DIR}/release-${DATE}.m4.tar ./enemieslist.com/dist/etc/
tar rvf ${DIR}/release-${DATE}.m4.tar ./enemieslist.com/dist/var/
cd ${DIR}
# gzip the dist file
gzip ${DIR}/release-${DATE}.m4.tar
mv ${DIR}/release-${DATE}.m4.tar.gz ${DIR}/release-${DATE}.m4.tgz
# remove old symlink
rm ${DIR}/release.m4.tgz
# and create new one
ln -s ${DIR}/release-${DATE}.m4.tgz ${DIR}/release.m4.tgz
# redirect diff output into release-$DATE.NOTES
echo diff -bitsr tmp/${LASTDATE} tmp/${DATE}
diff -bitsr tmp/${LASTDATE} tmp/${DATE} \
| grep -v 'identical' \
| perl -pe 's/^diff.*\/(EL_.*)$/$1:\n\n - \n/' > ${DIR}/release-${DATE}.NOTES
# emacs NOTES file and turn into useful documentation
emacs ${DIR}/release-${DATE}.NOTES