libreboot-sources 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. update() {
  20. local repository_path=$root
  21. git_fetch "$repository_path"
  22. git_merge "$repository_path" "$ORIGIN_HEAD"
  23. }
  24. install() {
  25. local install_path=$(project_install_path "$project" "$@")
  26. project_install "$project" "$@"
  27. }
  28. install_check() {
  29. project_install_check "$project" "$@"
  30. }
  31. release() {
  32. local archive_path=$(project_release_archive_path "$project" "$SOURCES" "$@")
  33. local sources_path=$root
  34. project_release_install "$project" "$TOOLS" "$@"
  35. printf '%s\n' "$VERSION" > "$sources_path/$DOTVERSION"
  36. printf '%s\n' "$SOURCE_DATE_EPOCH" > "$sources_path/$DOTEPOCH"
  37. if git_check "$sources_path"
  38. then
  39. git_revision "$sources_path" > "$sources_path/$DOTREVISION"
  40. fi
  41. archive_create "$archive_path" "$sources_path" "$BUILD_SYSTEM"
  42. file_verification_create "$archive_path"
  43. }
  44. release_check() {
  45. local archive_path=$(project_release_archive_path "$project" "$SOURCES" "$@")
  46. project_release_install_check "$project" "$TOOLS" "$@"
  47. file_exists_check "$archive_path"
  48. }
  49. clean() {
  50. project_clean "$project" "$@"
  51. }