upload_source.sh 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. ## upload_source.sh
  12. ##
  13. ## Abstract:
  14. ##
  15. ## This script uploads the bin archive. SRCROOT, ARCH and DEBUG must be set.
  16. ##
  17. ## Author:
  18. ##
  19. ## Evan Green 14-May-2014
  20. ##
  21. ## Environment:
  22. ##
  23. ## Minoca (Windows) Build
  24. ##
  25. set -e
  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. export TMPDIR=$PWD
  37. export TEMP=$TMPDIR
  38. export PATH="$SRCROOT/tools/win32/mingw/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"
  39. file=minoca-src.tar.gz
  40. file_size=`ls -l $file | \
  41. sed -n 's/[^ ]* *[^ ]* *[^ ]* *[^ ]* *\([0123456789]*\).*/\1/p'`
  42. python $SRCROOT/client.py --result "Source Size" integer "$file_size"
  43. python $SRCROOT/client.py --upload schedule $file $file
  44. echo Uploaded file $file, size $file_size
  45. echo rm $file
  46. rm $file
  47. echo rm -rf ./src
  48. rm -rf ./src