build-rebuild-todo-list.sh 598 B

1234567891011121314151617181920212223
  1. #!/usr/bin/env bash
  2. if [ -z "${1}" ]; then
  3. echo "Usage: $0 <old_ruby_version>"
  4. exit 1
  5. fi
  6. ruby_version_short="${1:0:3}"
  7. ruby_version_long="${ruby_version_short}.0"
  8. todo_list_filename="./ruby_rebuild_todo.txt"
  9. sudo pacman -Fy
  10. echo
  11. echo "Generating ${todo_list_filename} ..."
  12. {
  13. pacman -Fx ".*/ruby/(${ruby_version_long}|gems/${ruby_version_long}|vendor_ruby/${ruby_version_short}|vendor_ruby/${ruby_version_long})/*" |sed -ne 's,^.*\(core\|extra\|multilib\)/\(.*\) .*$,\2,p'
  14. sogrep extra libruby.so
  15. sogrep extra "libruby.so.${ruby_version_short}"
  16. } | sort -u > "${todo_list_filename}"