vboot 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. #!/usr/bin/env bash
  2. # Copyright (C) 2016 Paul Kocialkowski <contact@paulk.fr>
  3. #
  4. # This program is free software: you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation, either version 3 of the License, or
  7. # (at your option) any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. arguments() {
  17. project_arguments_targets "$project" "$@"
  18. }
  19. usage() {
  20. project_usage_actions "$project" "checkout"
  21. project_usage_arguments "$project" "$@"
  22. }
  23. download() {
  24. local repository=$project
  25. project_download_git "$project" "$repository" "https://chromium.googlesource.com/chromiumos/platform/vboot_reference https://review.coreboot.org/vboot.git https://github.com/coreboot/vboot.git" "$@"
  26. }
  27. download_check() {
  28. project_download_check_git "$project" "$repository" "$@"
  29. }
  30. extract() {
  31. project_extract "$project" "$@"
  32. }
  33. extract_check() {
  34. project_extract_check "$project" "$@"
  35. }
  36. update() {
  37. local repository=$project
  38. project_update_git "$project" "$repository" "$@"
  39. }
  40. update_check() {
  41. local repository=$project
  42. project_update_check_git "$project" "$repository" "$@"
  43. }
  44. checkout() {
  45. local repository=$project
  46. if git_project_check "$repository"
  47. then
  48. git_project_checkout "$project" "$repository" "$@"
  49. fi
  50. }
  51. build() {
  52. local target=$1
  53. local repository=$project
  54. project_sources_directory_missing_empty_error "$project" "$repository" "$@"
  55. if git_project_check "$repository"
  56. then
  57. git_project_checkout "$project" "$repository" "$@"
  58. fi
  59. if [ "$target" = "tools" ]
  60. then
  61. local sources_path=$( project_sources_path "$project" "$repository" "$@" )
  62. local build_path=$( project_build_path "$project" "$@" )
  63. mkdir -p "$build_path"
  64. make -C "$sources_path" BUILD="$build_path" -j$TASKS "host_stuff"
  65. make -C "$sources_path" BUILD="$build_path" -j$TASKS "host_stuff"
  66. cp -r "$sources_path/tests/devkeys" "$build_path"
  67. fi
  68. }
  69. build_check() {
  70. local target=$1
  71. if [ "$target" = "tools" ]
  72. then
  73. project_build_check "$project" "$@"
  74. fi
  75. }
  76. install() {
  77. local target=$1
  78. if [ "$target" = "tools" ]
  79. then
  80. project_install "$project" "$@"
  81. fi
  82. }
  83. install_check() {
  84. local target=$1
  85. if [ "$target" = "tools" ]
  86. then
  87. project_install_check "$project" "$@"
  88. fi
  89. }
  90. release() {
  91. local target=$1
  92. local repository=$project
  93. if [ "$target" = "tools" ]
  94. then
  95. project_release_install_archive "$project" "$TOOLS" "$@"
  96. fi
  97. project_release_sources_git "$project" "$repository" "$@"
  98. }
  99. release_check() {
  100. local target=$1
  101. local repository=$project
  102. if [ "$target" = "tools" ]
  103. then
  104. project_release_install_archive_check "$project" "$TOOLS" "$@"
  105. fi
  106. project_release_check_sources_git "$project" "$repository" "$@"
  107. }
  108. clean() {
  109. project_clean "$project" "$@"
  110. }