build_docker.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #!/bin/bash
  2. exists() { type -t "$1" > /dev/null 2>&1; }
  3. export APP_NAME="VSCodium"
  4. export CI_BUILD="no"
  5. export OS_NAME="linux"
  6. export SHOULD_BUILD="yes"
  7. export SKIP_ASSETS="yes"
  8. export VSCODE_LATEST="no"
  9. export VSCODE_QUALITY="stable"
  10. while getopts ":ilp" opt; do
  11. case "$opt" in
  12. i)
  13. export VSCODE_QUALITY="insider"
  14. ;;
  15. l)
  16. export VSCODE_LATEST="yes"
  17. ;;
  18. p)
  19. export SKIP_ASSETS="no"
  20. ;;
  21. esac
  22. done
  23. if ! exists yarn; then
  24. curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
  25. sudo apt-get install -y nodejs desktop-file-utils
  26. npm install -g yarn
  27. fi
  28. UNAME_ARCH=$( uname -m )
  29. if [[ "${UNAME_ARCH}" == "x86_64" ]]; then
  30. export VSCODE_ARCH="x64"
  31. else
  32. export npm_config_arch=armv7l
  33. export npm_config_force_process_config="true"
  34. export VSCODE_ARCH="armhf"
  35. fi
  36. echo "OS_NAME=\"${OS_NAME}\""
  37. echo "SKIP_ASSETS=\"${SKIP_ASSETS}\""
  38. echo "VSCODE_ARCH=\"${VSCODE_ARCH}\""
  39. echo "VSCODE_LATEST=\"${VSCODE_LATEST}\""
  40. echo "VSCODE_QUALITY=\"${VSCODE_QUALITY}\""
  41. rm -rf vscode* VSCode*
  42. . get_repo.sh
  43. . build.sh
  44. if [[ "${SKIP_ASSETS}" == "no" ]]; then
  45. . prepare_assets.sh
  46. fi