package_binaries.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #!/bin/sh
  2. ## Copyright (c) 2014 Minoca Corp.
  3. ##
  4. ## This file is licensed under the terms of the GNU General Public License
  5. ## version 3. Alternative licensing terms are available. Contact
  6. ## info@minocacorp.com for details. See the LICENSE file at the root of this
  7. ## project for complete licensing information..
  8. ##
  9. ## Script Name:
  10. ##
  11. ## package_binaries.sh
  12. ##
  13. ## Abstract:
  14. ##
  15. ## This script compresses the bin directory of the build output. SRCROOT,
  16. ## ARCH, and DEBUG must all be set.
  17. ##
  18. ## Author:
  19. ##
  20. ## Evan Green 13-May-2014
  21. ##
  22. ## Environment:
  23. ##
  24. ## Minoca (Windows) Build
  25. ##
  26. SAVE_IFS="$IFS"
  27. IFS='
  28. '
  29. export SRCROOT=`echo $SRCROOT | sed 's_\\\\_/_g'`
  30. IFS="$SAVE_IFS"
  31. unset SAVE_IFS
  32. if test -z $SRCROOT; then
  33. echo "SRCROOT must be set."
  34. exit 1
  35. fi
  36. if test -z $ARCH; then
  37. echo "ARCH must be set."
  38. exit 1
  39. fi
  40. if test -z $DEBUG; then
  41. echo "DEBUG must be set."
  42. exit 1
  43. fi
  44. export TMPDIR=$PWD
  45. export TEMP=$TMPDIR
  46. OUTROOT="$SRCROOT/$ARCH$VARIANT$DEBUG"
  47. export PATH="$SRCROOT/tools/win32/mingw/bin;$OUTROOT/tools/bin;$OUTROOT/testbin;$SRCROOT/tools/win32/scripts;$SRCROOT/tools/win32/swiss;$SRCROOT/tools/win32/bin;$SRCROOT/tools/win32/ppython/app;$SRCROOT/tools/win32/ppython/App/Scripts;$PATH"
  48. tar -czf minoca-bin-${ARCH}${VARIANT}${DEBUG}-win32.tar.gz -C $OUTROOT/bin .
  49. exit 0