upload_source.sh 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/bin/sh
  2. ## Copyright (c) 2014 Minoca Corp. All Rights Reserved.
  3. ##
  4. ## Script Name:
  5. ##
  6. ## upload_source.sh
  7. ##
  8. ## Abstract:
  9. ##
  10. ## This script uploads the bin archive. SRCROOT, ARCH and DEBUG must be set.
  11. ##
  12. ## Author:
  13. ##
  14. ## Evan Green 14-May-2014
  15. ##
  16. ## Environment:
  17. ##
  18. ## Minoca (Windows) Build
  19. ##
  20. set -e
  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. export TMPDIR=$PWD
  32. export TEMP=$TMPDIR
  33. export PATH="$SRCROOT/tools/win32/mingw/bin;$SRCROOT/tools;$SRCROOT/tools/win32/scripts;$SRCROOT/tools/win32/swiss;$SRCROOT/tools/win32/bin;$SRCROOT/tools/win32/ppython/app;$SRCROOT/tools/win32/ppython/App/Scripts;$PATH"
  34. file=minoca-src.tar.gz
  35. file_size=`ls -l $file | \
  36. sed -n 's/[^ ]* *[^ ]* *[^ ]* *[^ ]* *\([0123456789]*\).*/\1/p'`
  37. python $SRCROOT/client.py --result "Source Size" integer "$file_size"
  38. python $SRCROOT/client.py --upload schedule $file $file
  39. echo Uploaded file $file, size $file_size
  40. echo rm $file
  41. rm $file
  42. echo rm -rf ./src
  43. rm -rf ./src