sm-tooltool-config.sh 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/bin/bash
  2. set -xe
  3. : ${TOOLTOOL_SERVER:=https://api.pub.build.mozilla.org/tooltool/}
  4. : ${SPIDERMONKEY_VARIANT:=plain}
  5. : ${UPLOAD_DIR:=$HOME/artifacts/}
  6. : ${WORK:=$HOME/workspace}
  7. : ${SRCDIR:=$WORK/build/src}
  8. mkdir -p $WORK
  9. cd $WORK
  10. # Need to install things from tooltool. Figure out what platform to use.
  11. case $(uname -m) in
  12. i686 | arm )
  13. BITS=32
  14. ;;
  15. *)
  16. BITS=64
  17. ;;
  18. esac
  19. case "$OSTYPE" in
  20. darwin*)
  21. PLATFORM_OS=macosx
  22. ;;
  23. linux-gnu)
  24. PLATFORM_OS=linux
  25. ;;
  26. msys)
  27. PLATFORM_OS=win
  28. ;;
  29. *)
  30. echo "Unrecognized OSTYPE '$OSTYPE'" >&2
  31. PLATFORM_OS=linux
  32. ;;
  33. esac
  34. # Install everything needed for the browser on this platform. Not all of it is
  35. # necessary for the JS shell, but it's less duplication to share tooltool
  36. # manifests.
  37. BROWSER_PLATFORM=$PLATFORM_OS$BITS
  38. : ${TOOLTOOL_MANIFEST:=browser/config/tooltool-manifests/$BROWSER_PLATFORM/releng.manifest}
  39. : ${TOOLTOOL_CHECKOUT:=$WORK}
  40. export TOOLTOOL_CHECKOUT
  41. (cd $TOOLTOOL_CHECKOUT && python ${SRCDIR}/testing/docker/recipes/tooltool.py --url $TOOLTOOL_SERVER -m $SRCDIR/$TOOLTOOL_MANIFEST fetch ${TOOLTOOL_CACHE:+ -c $TOOLTOOL_CACHE})