libreboot-sources 1.7 KB

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