2 # * THIS SCRIPT IS OBSOLETE DO NOT USE *
4 MAJORVER=`grep NASM_MAJOR_VER nasm.h | head -1 | cut -f3 -d' '`
5 MINORVER=`grep NASM_MINOR_VER nasm.h | head -1 | cut -f3 -d' '`
6 VERSION=`grep NASM_VER nasm.h | head -1 | cut -f3 -d' ' | sed s/\"//g`
7 DOSVERSION="${MAJORVER}${MINORVER}"
8 NASM_TAR_GZ=dist/nasm-${VERSION}.tar.gz
9 NASM_ZIP=dist/nasm${DOSVERSION}s.zip
10 NASM_DOS_ZIP=dist/nasm${DOSVERSION}.zip
11 NASM_DOC_ZIP=dist/nasm${DOSVERSION}d.zip
13 if [ -d dist ]; then rm -rf dist; fi
14 if [ -d nasm-${VERSION} ]; then rm -rf nasm-${VERSION}; fi
15 if [ ! -d dist ]; then mkdir dist; fi
16 if [ -f dist/nasm.tar.gz ]; then rm dist/nasm.tar.gz; fi
18 (cd nasm-${VERSION}; ln -s ../* .;
19 rm -f nasm-${VERSION} dist Checklist GNUmakefile)
20 find nasm-${VERSION}/ -follow -name GNUmakefile > tar-exclude
21 find nasm-${VERSION}/ -follow -name RCS >> tar-exclude
22 find nasm-${VERSION}/ -follow -name '*.exe' >> tar-exclude
23 find nasm-${VERSION}/ -follow -name '*.uu' >> tar-exclude
24 find nasm-${VERSION}/ -follow -name '*,v' >> tar-exclude
25 for i in nasm-${VERSION}/doc/{nasmdoc.hpj,nasmdoc.rtf,nasmdoc.texi,Readme};
26 do echo $i; done >> tar-exclude
27 tar chvfX dist/nasm-${VERSION}.tar tar-exclude nasm-${VERSION}
29 tar tf dist/nasm-${VERSION}.tar | (echo nasm.doc; sed \
30 -e 's:^nasm-[^/]*/::' \
33 -e '/makedist\.sh/d' \
36 -e '/doc\/.*\.html/d' \
38 -e '/doc\/nasmdoc\.ps/d' \
39 -e '/doc\/nasmdoc\.txt/d' \
40 -e '/doc\/nasmdoc\.rtf/d' \
41 -e '/doc\/nasmdoc\.hpj/d' \
42 -e '/doc\/nasmdoc\.texi/d' \
43 -e '/doc\/nasmdoc\.hlp/d' \
44 -e '/doc\/nasm\.info/d' \
47 -e '/^[^\/]*\.\(c\|h\|pl\|bas\|dat\)$/d' \
48 -e '/^doc\(\/.*\)\?/d' \
49 -e '/standard\.mac/d' \
52 < zipfiles > zipfiles.dos
53 gzip -9 dist/nasm-${VERSION}.tar
54 rm -rf nasm-${VERSION}
55 ln -s doc/nasmdoc.src nasm.doc
56 zip -l -k ${NASM_ZIP} `cat zipfiles`
57 zip -k ${NASM_ZIP} *.exe misc/exasm.zip
58 zip -l -k ${NASM_DOS_ZIP} `cat zipfiles.dos`
59 zip -k ${NASM_DOS_ZIP} *.exe misc/exasm.zip
61 (cd doc; zip -l -k ../${NASM_DOC_ZIP} \
63 nasmdoc.src rdsrc.pl \
67 zip -k ../${NASM_DOC_ZIP} \
70 rm -f zipfiles zipfiles.dos
71 echo Distributions complete.