build_docker.sh 1.2 KB

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