flashmap 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. usage() {
  17. project_usage_actions "$project"
  18. }
  19. download() {
  20. local repository=$project
  21. project_download_git "$project" "$repository" "https://chromium.googlesource.com/chromiumos/third_party/flashmap" "$@"
  22. }
  23. download_check() {
  24. local repository=$project
  25. project_download_check_git "$project" "$repository" "$@"
  26. }
  27. extract() {
  28. local repository=$project
  29. project_extract "$project" "$@"
  30. }
  31. extract_check() {
  32. local repository=$project
  33. project_extract_check "$project" "$@"
  34. }
  35. update() {
  36. local repository=$project
  37. project_update_git "$project" "$repository" "$@"
  38. }
  39. update_check() {
  40. local repository=$project
  41. project_update_check_git "$project" "$repository" "$@"
  42. }
  43. build() {
  44. local repository=$project
  45. project_sources_directory_missing_empty_error "$project" "$repository" "$@"
  46. local sources_path=$(project_sources_path "$project" "$repository" "$@")
  47. local build_path=$(project_build_path "$project" "$@")
  48. if git_project_check "$repository"
  49. then
  50. git_project_checkout "$project" "$repository" "$@"
  51. fi
  52. mkdir -p "$build_path"
  53. make -C "$sources_path" -j$TASKS
  54. cp -r "$sources_path/lib" "$build_path"
  55. make -C "$sources_path" "clean"
  56. }
  57. build_check() {
  58. project_build_check "$project" "$@"
  59. }
  60. release() {
  61. local repository=$project
  62. project_release_sources_git "$project" "$repository" "$@"
  63. }
  64. release_check() {
  65. local repository=$project
  66. project_release_check_sources_git "$project" "$repository" "$@"
  67. }
  68. clean() {
  69. project_clean "$project" "$@"
  70. }