]>
Commit | Line | Data |
---|---|---|
6fc6879b JM |
1 | #!/bin/sh |
2 | ||
6fc6879b JM |
3 | set -e |
4 | ||
5 | if [ -z "$1" ]; then | |
8d2f0546 | 6 | echo "build_release <version>" |
6fc6879b JM |
7 | exit 1 |
8 | fi | |
9 | ||
10 | TMP=tmp.build_release | |
11 | RELDIR=`pwd`/Release | |
12 | VER=$1 | |
13 | NOW=`date +%Y-%m-%d` | |
14 | ||
15 | echo "Version: $VER - $NOW" | |
16 | ||
17 | DATEw=`head -n 3 wpa_supplicant/ChangeLog | tail -n 1 | sed "s/ .*//"` | |
18 | DATEh=`head -n 3 hostapd/ChangeLog | tail -n 1 | sed "s/ .*//"` | |
19 | ||
20 | if [ "$DATEw" != "$NOW" -o "$DATEh" != "$NOW" ]; then | |
21 | echo "NOTE! Date mismatch in ChangeLog: wpa_supplicant $DATEw hostapd $DATEh != $NOW" | |
22 | fi | |
23 | ||
24 | if [ -r $TMP ]; then | |
25 | echo "Temporary directory '$TMP' exists. Remove it before running this." | |
26 | exit 1 | |
27 | fi | |
28 | ||
29 | mkdir $TMP | |
30 | mkdir -p $RELDIR | |
31 | ||
6ae22572 | 32 | git archive --format=tar --prefix=wpa-$VER/ HEAD \ |
38af0423 | 33 | README COPYING CONTRIBUTIONS src wpa_supplicant hostapd hs20 | |
6fc6879b | 34 | gzip > $RELDIR/wpa-$VER.tar.gz |
6ae22572 | 35 | git archive --format=tar --prefix=hostapd-$VER/ HEAD \ |
38af0423 | 36 | README COPYING CONTRIBUTIONS src hostapd | |
6fc6879b | 37 | gzip > $RELDIR/hostapd-$VER.tar.gz |
6ae22572 | 38 | git archive --format=tar --prefix=wpa_supplicant-$VER/ HEAD \ |
38af0423 | 39 | README COPYING CONTRIBUTIONS src wpa_supplicant hs20/client | |
6fc6879b JM |
40 | tar --directory=$TMP -xf - |
41 | ||
42 | cd $TMP | |
43 | make -C wpa_supplicant-$VER/wpa_supplicant/doc/docbook man | |
44 | rm -f wpa_supplicant-$VER/wpa_supplicant/doc/docbook/manpage.{links,refs} | |
45 | tar czf $RELDIR/wpa_supplicant-$VER.tar.gz wpa_supplicant-$VER | |
46 | cd .. | |
47 | rm -r $TMP |