flashmap 2.1 KB

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