package_binaries.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/bin/sh
  2. ## Copyright (c) 2014 Minoca Corp. All Rights Reserved.
  3. ##
  4. ## Script Name:
  5. ##
  6. ## package_binaries.sh
  7. ##
  8. ## Abstract:
  9. ##
  10. ## This script compresses the bin directory of the build output. SRCROOT,
  11. ## ARCH, and DEBUG must all be set.
  12. ##
  13. ## Author:
  14. ##
  15. ## Evan Green 13-May-2014
  16. ##
  17. ## Environment:
  18. ##
  19. ## Minoca (Windows) Build
  20. ##
  21. SAVE_IFS="$IFS"
  22. IFS='
  23. '
  24. export SRCROOT=`echo $SRCROOT | sed 's_\\\\_/_g'`
  25. IFS="$SAVE_IFS"
  26. unset SAVE_IFS
  27. if test -z $SRCROOT; then
  28. echo "SRCROOT must be set."
  29. exit 1
  30. fi
  31. if test -z $ARCH; then
  32. echo "ARCH must be set."
  33. exit 1
  34. fi
  35. if test -z $DEBUG; then
  36. echo "DEBUG must be set."
  37. exit 1
  38. fi
  39. export TMPDIR=$PWD
  40. export TEMP=$TMPDIR
  41. OUTROOT="$SRCROOT/$ARCH$VARIANT$DEBUG"
  42. export PATH="$SRCROOT/tools/win32/mingw/bin;$SRCROOT/tools;$OUTROOT/bin;$OUTROOT/testbin;$OUTROOT/bin/tools/bin;$SRCROOT/tools/win32/scripts;$SRCROOT/tools/win32/swiss;$SRCROOT/tools/win32/bin;$SRCROOT/tools/win32/ppython/app;$SRCROOT/tools/win32/ppython/App/Scripts;$PATH"
  43. tar -czf minoca-bin-${ARCH}${VARIANT}${DEBUG}-win32.tar.gz -C $OUTROOT/bin .
  44. exit 0