list_toolchain_updates 749 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/bash
  2. set -e
  3. rootdir="$(pwd)"
  4. no_updates="$rootdir/no_updates.txt"
  5. updates="$rootdir/updates.txt"
  6. tar -xf [% project %]-[% c('version') %].tar.gz
  7. cd [% project %]-[% c('version') %]
  8. function check_update_needed() {
  9. name="$1"
  10. v1="$2"
  11. v2="$3"
  12. if test "$v1" = "$v2"
  13. then
  14. echo "* $name ($v1)" >> "$no_updates"
  15. else
  16. echo "* $name needs to be updated to $v1 (currently at $v2)" >> "$updates"
  17. fi
  18. }
  19. [% INCLUDE list_toolchain_updates_checks %]
  20. echo '### Component: [% project %] ([% c("git_hash") %])'
  21. if test -f "$updates"
  22. then
  23. echo "The following components need to be updated:"
  24. cat "$updates"
  25. echo
  26. fi
  27. if test -f "$no_updates"
  28. then
  29. echo "The following components don't need to be updated:"
  30. cat "$no_updates"
  31. fi