print_lookup_table(): Print metadata entries
[wimlib] / make-windoze-release
1 #!/bin/bash
2
3 set -e -u
4
5 DESTDIR=/mnt/tmp/wimlib
6 ARCH=i686
7 VERSION=$(grep 'This is wimlib version' README | grep -o '[0-9]\+\.[0-9]\+\.[0-9]')
8 ZIPFILE=wimlib-${VERSION}-windows-${ARCH}-bin.zip
9
10 if ! grep -q "./configure --host=${ARCH}-w64-mingw32" config.log; then
11         ./configure --host=${ARCH}-w64-mingw32
12 fi
13
14 make -j2
15
16 rm -f $DESTDIR/{libwim-*.dll,doc/*,README*,NEWS*}
17
18 cp .libs/imagex.exe $DESTDIR/wimlib-imagex.exe
19 cp .libs/libwim-*.dll $DESTDIR
20 cp README* NEWS $DESTDIR
21
22
23
24 for fil in ./doc/wimlib-imagex-*.1; do
25         echo $fil
26         base=`basename $fil`
27         base=${base%%.1}
28         #MANWIDTH=80 man $fil | col -b > $DESTDIR/doc/$base
29         man -t $fil | ps2pdf - $DESTDIR/doc/${base}.pdf
30 done
31
32 #for fil in $DESTDIR/{README*,NEWS} $DESTDIR/doc/*; do
33 for fil in $DESTDIR/{README*,NEWS}; do
34         sed < $fil > ${fil}.txt -e 's/$/\r/g'
35         rm $fil
36 done
37
38
39 rm -f $ZIPFILE
40 (
41         dir=$PWD
42         cd $(dirname $DESTDIR) &> /dev/null
43         zip -r $dir/$ZIPFILE $(basename $DESTDIR)
44 )
45