3 # Generate a NASM release
5 # Usage: release {test|real} [branch]
8 if [ -z "$SFUSER" ]; then
9 if [ -f "$HOME/.sfuser" ]; then
10 sfuser
=`cat "$HOME/.sfuser"`
17 echo "Usage: $0 {test|real}" 1>&2
21 if [ "$1" = "real" ]; then
28 work
=`pwd`/nasm-release.$$
32 # SF uses a mirror server for anonymous CVS now. Therefore, use a real
33 # identity if we have one; otherwise, change the "true" below to "$real".
35 # Need to tag the tree, use real account
36 CVS
="cvs -z3 -d ${sfuser}@cvs.nasm.sourceforge.net:/cvsroot/nasm"
38 # Don't need to tag the tree, can use anonymous
39 echo ':pserver:anonymous@cvs.nasm.sourceforge.net:/cvsroot/nasm A' > "$work"/cvspass
40 export CVS_PASSFILE
="$work"/cvspass
41 CVS
="cvs -z3 -d :pserver:anonymous@cvs.nasm.sourceforge.net:/cvsroot/nasm"
48 $CVS co
$branchopt nasm
49 version
=`cat nasm/version`
50 v1
=`echo $version | cut -d. -f1`
51 v2
=`echo $version | cut -d. -f2`
52 v3
=`echo $version | cut -d. -f3`
54 # Tag the tree as a release
56 cvstag
=nasm-
`echo $version | sed -e 's/\./_/g'`
57 # Create the tag for this release
58 ( cd nasm
&& $CVS tag
-F $cvstag )
59 # Update the LATEST tag
60 $CVS rtag
-r $cvstag -F -a LATEST nasm
63 # Extract file names which have the -kb flag set, meaning they
68 find .
-type d
-name CVS
-print |
(
70 xdir
=`echo "$dir" | sed -e 's|^\./||' -e 's|/CVS$||'`
71 egrep '^/[^/]*/[^/]*/[^/]*/[^/]*-kb[^/]*/' < $dir/Entries | \
72 cut
-d/ -f2 |
sed -e "s|^|$xdir/|" >> "$bins"
77 # We did "co" instead of "export" -- remove CVS directories
78 find nasm
-type d
-name CVS
-print |
xargs rm -rf
80 # Create files which are in the release but automatically generated
84 .
/configure
--prefix=/usr
/local
88 # Clean up any previous attempt
89 rm -f ..
/nasm-
${version}.
tar.gz ..
/nasm-
${version}-xdoc.
tar.gz
90 rm -f ..
/nasm-
${version}.
tar.bz2 ..
/nasm-
${version}-xdoc.
tar.bz2
91 rm -f ..
/nasm-
${version}.
zip ..
/nasm-
${version}-xdoc.
zip
93 # Create tarfile (Unix convention: file includes prefix)
95 tar cvvf nasm-
${version}.
tar nasm-
${version}
96 bzip2 -9k nasm-
${version}.
tar
97 gzip -9 nasm-
${version}.
tar
98 mv nasm-
${version}.
tar.gz nasm-
${version}.
tar.bz2 ..
100 # Create zipfile (DOS convention: no prefix, convert file endings)
102 zip -9Dlr ..
/..
/nasm-
${version}.
zip -x@
"$bins" * # Text files
103 zip -9Dgr ..
/..
/nasm-
${version}.
zip -i@
"$bins" * # Binary files
106 # Record what we have already generated
107 find nasm-
$version -not -type d
-print > main
109 # Create documentation
111 .
/configure
--prefix=/usr
/local
113 # Remove intermediate files.
117 # Remove non-documentation
118 cat main |
xargs rm -f
121 tar cvvf nasm-
${version}-xdoc.
tar nasm-
${version}/doc
122 bzip2 -9k nasm-
${version}-xdoc.
tar
123 gzip -9 nasm-
${version}-xdoc.
tar
124 mv nasm-
${version}-xdoc.
tar.gz nasm-
${version}-xdoc.
tar.bz2 ..
126 # Create doc zipfile (DOS convention: no prefix, convert file endings)
127 # (Note: generating Win .hlp files requires additional tools)
129 zip -9Dlr ..
/..
/nasm-
${version}-xdoc.
zip doc
-x \
*.pdf
130 zip -9Dgr ..
/..
/nasm-
${version}-xdoc.
zip doc
-i \
*.pdf