Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. # Assumes pacakages are from webtatic, might need to adjust for other repos
  3. # @webtatic packages look like this:
  4. # php71w-common.x86_64 7.1.7-1.w7 @webtatic
  5.  
  6. versionFrom=70
  7.  
  8. versionTo=71
  9.  
  10. yum list installed | grep php > /tmp/php_installed
  11.  
  12. while read -r line; do echo $line; package=$(echo $line | cut -d ' ' -f 1 | sed "s/$versionFrom/$versionTo/g"); echo $package; yum -y install $package done < /tmp/php_installed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement