makeautopackage 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/bin/bash
  2. # Author: Francesco Montorsi <frm@users.sourceforge.net>
  3. rootdir=../..
  4. thisdir=distrib/autopackage
  5. currloc="http://biolpc22.york.ac.uk/pub/autopackage/wxgtk/"
  6. function reminder
  7. {
  8. echo = REMINDER ===================================================
  9. echo Now that the autopackage has been built successfully, remember
  10. echo to upload the .meta, .package and .xml files to the
  11. echo " $currloc"
  12. echo folder.
  13. echo ==============================================================
  14. }
  15. function build_package
  16. {
  17. me=`basename $0`
  18. cd $rootdir
  19. if [[ ! -f "config.status" ]]; then
  20. echo $me: Running a fake configure just to create a config.status
  21. echo $me: with a valid PACKAGE_VERSION set... please wait.
  22. ./configure >/dev/null 2>&1
  23. fi
  24. if [[ "$1" = "--help" ]]; then
  25. makeinstaller $@
  26. exit 0
  27. fi
  28. # this will automatically update wxgtk.apspec from wxgtk.apspec.in
  29. # using config.status script
  30. makeinstaller $@ $thisdir/wxgtk.apspec
  31. if [[ "$?" = "0" ]]; then
  32. mv *.package *.xml *.meta $thisdir >/dev/null 2>&1
  33. reminder
  34. fi
  35. }
  36. function clean_previous
  37. {
  38. rm -f wxgtk.apspec # this was generated from wxgtk.apspec.in
  39. rm -f *.xml *.package *.meta
  40. }
  41. clean_previous
  42. build_package $@