build_release 1.2 KB

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